Hello,
I have a page where the first loading of Jquery does not run, refreshing the page (refresh, F5) the function written in JQuery works.
I'm using JQuery with Ruby On Rails technology.
Solutions:
- Add script at the end of HTML.
- Removing Turbolinks from application.html.erb
- Add function in application.js
NOTE: None of the above solutions worked.
Part of the JQuery function:
$(document).ready(function() {
request_guides();
});
function request_guides() {
//logica
}
It was also done this way
$(function() {
request_guides();
});
function request_guides() {
//logica
}
Anyone have ideas for a solution?
Thank you!