[jQuery] Re: Opening a div causes jump to top of page

2009-01-29 Thread Karl Swedberg
On Jan 29, 2009, at 6:41 PM, EricC wrote: Try: $('.morePhotos').click (function(event) { event.preventDefault; $(this).parents().find('.pPictureStrip').toggle(); }); Thank you for the suggestion however it did not seem to work... Hi Eric, I know you were able to get it work by using re

[jQuery] Re: Opening a div causes jump to top of page

2009-01-29 Thread EricC
Thank you Rick, Brian and Mauricio, the return false line fixed it right up! Cheers.

[jQuery] Re: Opening a div causes jump to top of page

2009-01-29 Thread Rick Faircloth
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 > S

[jQuery] Re: Opening a div causes jump to top of page

2009-01-29 Thread EricC
> Try: > $('.morePhotos').click (function(event) { > event.preventDefault; > $(this).parents().find('.pPictureStrip').toggle(); > > }); Thank you for the suggestion however it did not seem to work...

[jQuery] Re: Opening a div causes jump to top of page

2009-01-29 Thread brian
You have a hash (#) in the href attribute. This is the expected behavior. You'll need to return false from your click handler. On Thu, Jan 29, 2009 at 6:21 PM, EricC wrote: > > Hi, > > I have a page that opens some divs based on user feedback (try the > more photos links please). If you happen t

[jQuery] Re: Opening a div causes jump to top of page

2009-01-29 Thread Mauricio (Maujor) Samy Silva
Try: $('.morePhotos').click (function(event) { event.preventDefault; $(this).parents().find('.pPictureStrip').toggle(); }); / -Mensagem Original- De: "EricC" Para: "jQuery (English)" Enviada em: quinta-feira, 29 de janeiro de 2009 21:21 Assunto: [jQuery] Opening a div causes jump t