Try putting return false; in your code: $('.morePhotos').click(function() { $(this).parents().find('pPictureStrip').toggle(); return false; });
hth, Rick > -----Original Message----- > From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On > Behalf Of EricC > Sent: Thursday, January 29, 2009 6:22 PM > To: jQuery (English) > Subject: [jQuery] Opening a div causes jump to top of page > > > Hi, > > I have a page that opens some divs based on user feedback (try the > more photos links please). If you happen to be scrolled down the page > and you toggle something open the browser pops to the top, thus > closing the new div. > > Example: > http://rtrservices.com/equipment.php?page=test > > Code: > $('.morePhotos').click (function() { > $(this).parents().find('.pPictureStrip').toggle(); > }); > > I need it not to move the page, any help would be appreciated. > > Cheers, > > Eric