0
I have a jQuery script to apply Blur effect on a div while the page undergoes a scroll.
jQuery:
$(document).scroll(function(){
var pixs = $(document).scrollTop()
pixs = pixs / 10;
$('.tudo').css({"-webkit-filter": "blur("+pixs+"px)","filter": "blur("+pixs+"px)"});});
The class div . everything is the whole body of the page to test the effect, but nothing is working.
Can anyone identify the problem?
Script import
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="javascript/javascript.js"></script>
By the test here is working. It must be something else with error. Already looked in the console some error?
– Sam
You want the Blur effect only during scroll and while stopping go back to normal?
– Leandro Angelo
Could post the html?
– Caique Romero
I succeeded, the problem was in the overflow of the prince element, the div . everything.
– ehjota