I have a Rails 4 application with Bootstrap 3 and have noticed that the jQuery handler for .ready() is not executed everytime a page loads in the safari browser of my iphone 5 or ipad mini (both ios 7) whereas it is in the chrome browser of both devices. Instead, the handler only executes when the application is initially loaded into Safari on my iOS devices but that's it... it doesn't execute the handler again. In addition, the handler is also executed every time a page loads in Chrome, Firefox, and Safari browsers on my laptop. Can somebody explain how I can get Safari to execute the .ready() handler everytime the page loads on iOS devices. Here's the code:
$(function() {
alert("DOM is ready");
});
This is obviously a trivial example but I was having problems with jQuery functions not executing consistently and believe this is the cause.