0
Hello,
I have a page where the first load of it Jquery is not executed, when updating the page (refresh, F5) the function written in Jquery now works.
I’m using Jquery with technology Ruby On Rails.
Solutions:
- Add script at end of HTML.
- Removal of Turbolinks from application.html.erb
- Add function in application.js
NOTE: However, none of the above solutions worked.
Part of the Jquery function:
$(document).ready(function() {
request_guides();
});
function request_guides() {
//logica
}
It was also made that way
$(function() {
request_guides();
});
function request_guides() {
//logica
}
Someone has an idea of a solution ?
Grateful!
This seems more like a browser error when loading jQuery. Is the connection slow? What do the browser tools say about the jQuery load? How you load it on the page?
– Oralista de Sistemas