开发者

stop scrolling on bookmark hyperlink clickin

开发者 https://www.devze.com 2023-01-06 18:59 出处:网络
I am trying to make a jquery similar tabs. since its for single use in single page i dun want to use jqu开发者_C百科ery so i am making my custom function.

I am trying to make a jquery similar tabs. since its for single use in single page i dun want to use jqu开发者_C百科ery so i am making my custom function.

I have my li tags as following

<li class="active"><a href="#tabs-0" onclick="showTabs(this); void(0);" class="active">Description</a></li>

My function gets fired and is working fine... but a small problem is that page scrolls upto the bookmark location


Use this:

<li class="active"><a href="#tabs-0" onclick="showTabs(this); return false;" class="active">Description</a></li>

return false; is preventing the default behavior from happening.

0

精彩评论

暂无评论...
验证码 换一张
取 消