prettyLoader stops $(window).scroll(function () )
  • Hi everybody. First i would like to say thank you to the author of this fine script. My problem is this.. i have a page that has a "load content on scroll" ( let's say it's the same as you see on facebook, you scroll down and more contend becomes visible ) When addind the "$.prettyLoader();" on document.ready the $(window).scroll() stops working. Any idea of why ? Thanks !
  • I was having the same problem. If you look through the prettyLoader javascript you will find the following function:

    $.prettyLoader.hide = function() {
    $(document).unbind('click', $.prettyLoader.positionLoader);
    $(document).unbind('mousemove', $.prettyLoader.positionLoader);
    $(window).unbind('scroll');
    $('.prettyLoader').fadeOut(settings.animation_speed, function() { $(this).remove(); });
    };

    All scroll event assignments are being unbound on the third line of the function. Commenting out this line solved the problem, and did not have a noticeable effect of the loading image.

    $.prettyLoader.hide = function() {
    $(document).unbind('click', $.prettyLoader.positionLoader);
    $(document).unbind('mousemove', $.prettyLoader.positionLoader);
    //$(window).unbind('scroll');
    $('.prettyLoader').fadeOut(settings.animation_speed, function() { $(this).remove(); });
    };

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter