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

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

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -