I am getting a strange problem by using jQuery's ready function.
I have a Ruby on Rails 4 application, and jQuery JavaScript Library v1.10.2, with some static pages that responds to the following urls:
http://localhost:3000/static_pages/home
http://localhost:3000/static_pages/about_us
I am using the following code for the javascript:
jQuery(document).ready( function($) {
alert('document ready');
});
The problem is that it only fires when I refresh the page with the browser button, while it doesn't work if I follow one of the above links on the html page..
What's the problem?