开发者

stop scrolling on bookmark hyperlink clickin

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜