Tuesday 15 June 2010

javascript - scrolling position keeps going to top without me telling it to -


I have a function that loads new items while approaching the bottom of the page. It works great, The only issue is that when new items are loaded, the scrolling position goes back to the top, which is very confusing and what I want. Function:

  function loader (url) {$ .get (url, function (data) {$ newposts = $ (data) .filter (function () {return.id $ == ' Post ';}). Children (); $ newPosts.hide (); $ wall.masonry (' deleted '); $ (' # post '). Attachments ($ newPosts); $ newPosts.each function () {$ (This). FadeIn ('slow');}); $ Wall.masonry ({item selector: '.entry, .entry_photo', is unauthorized: incorrect});}). Error (function (url) {warning ('error';});};   

So as you can see, it jumps back to the right top And how can I stop it? And why does this happen?

me It seems that the destruction of is the root cause of the issue in the masonry.

Attached method

  $ wall .append ($ NewPosts). Attached ', $ newPosts); Masanderi ('layout');    

No comments:

Post a Comment