DIV toggle display success,.. but In each press screen moves to Top

using this for a DIV of a long page with div id : $(“#report2011”) toggle display success,… but In each press screen moves to Top… how prevent this???


function clickAppear(e) {

		return false;


jQuery has a .scrollTop() method, that can let you know where the page currently is. You can remember that value and return it back to where it was after toggling things.

But, I don’t think that toggle normally scrolls things, so can we please investigate a test page that exhibits the problem at hand?

when used link page moved to top after toggle…

but solve it using: // which hasn’t anchor tag

<p class="CENTERP slogan_HEADER" style="text-decoration:underline; color:blue" onClick="clickAppear();">(click to show/hide)</p>

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.