javascript - How to prevent scrolling to the top after unhiding/hiding text? -


there old stackoverflow question on how unhide/hide text using +/- symbols.

cheeso posted nice solution sample code. looking for, although original poster didn't agree. :-)

i'm using code on web site intended used on mobile devices. problem page jumps top of screen whenever +/- tapped.

is there anyway around that? thanks.

in click event handler, return false.

$('a.selector').click(function() {     return false; }); 

Comments

Popular posts from this blog

jquery - Invalid Assignment Left-Hand Side -

java - Play! framework 2.0: How to display multiple image? -

asp.net mvc - Implementing normal user/pass, Twitter & Facebook auth -