internet explorer - Jquery code not working on IE and firefox -
i've made small jquery code, works on chrome , opera, not on ie , firefox.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"> $(document).scroll(function () { if ($('body')[0].scrolltop / $('body')[0].scrollheight > 0.29) { $(".over_one").fadein(2000); } else { $(".over_one").fadeout(1); } }); </script>
have searched here , here, not fixing problem.
i think have src
attribute , javascript code inside script tag. should separated 2 script tags.
generally posted written as: (though may not problem)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script> <script> $(document).ready(function () { if ($('body')[0].scrolltop / $('body')[0].scrollheight > 0.29) { $(".over_one").fadein(2000); } else { $(".over_one").fadeout(1); } }); </script>
Comments
Post a Comment