Probably you are using a dead link like: <a href="#" class="click-here">link</a>.

Try:
event.preventDefault
it acts as
return false;


$('.click-here')function(event) {
event.preventDefaul();
// more stuff
});



-----Mensagem Original----- De: "John D." <[EMAIL PROTECTED]>
Para: "jQuery (English)" <[email protected]>
Enviada em: quarta-feira, 8 de outubro de 2008 15:16
Assunto: [jQuery] link click send user back to top of page .toggle



Hi,

I have a page which requires vertical scrolling. In order to
consolidate content on page load I'm placing a heading link above each
div on the page and hiding the divs with jQuery. When the user clicks
on a given heading link the .toggle run and the div shows.

The problem I am running into is that each time a link is clicked it
returns the user back to the top of the page. Which becomes a major
annoyance if the user has scrolled down to access content further down
the page.

Any thoughts?

Thanks,

John

Reply via email to