I have this in my heading in my html file. The purpose of the code is to have an element (#hello) fade as the user scrolls the page. This is working as expected in Chrome, Safari and Opera, but the fade does not work in Firefox. Anyone know what is stopping it from performing the same way in all browsers?
<script src="http://code.jquery.com/jquery-1.11.0.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {
$(window).scroll(function() {
var scrollFromTop = $("body").scrollTop();
$("#hello").css("opacity", 1.5-scrollFromTop/250);
});
});
</script>