Inline document.ready is not firing up in my ec2 production server.It is however working fine locally.
1.I tried by replacing the inline
$( document ).ready(function() {
with
$(document).on('ready page:load', function () {
- I tried with setting up the gem jquery.turbolinks but still not working.
3.Even after removing the gem tubolinks and jquery turbolinks the problem persists.Inline document.ready functions are still not working.
I have already set the sendfile option in nginx config to false so that the page and the assets gets reloaded eveytime, and not are send from the server cache.
Kindly tell what am I missin.It has taken me a lot of days still not able to figure out why is it not working in production.
Update:
Ex My pages/home.html . I have tried to put this script on top of the page and on the bottom and also used content for :javascript tag but still did not worked.I have such script tags many places in my application.
<script type="text/javascript">
$( document ).ready(function() {
$('#element_1').hide(); $('#element_2').hide();
$('#element_3').hide(); });
</script>