views:

6

answers:

1

Hi guys,

I am trying to make a jquery similar tabs. since its for single use in single page i dun want to use jquery 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

+1  A: 

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.

Bogdan Constantinescu
thnx gr8... it helped alot... thnx for saving my time... :)
KoolKabin
No problem! :) Don't forget to accept the answer :)
Bogdan Constantinescu
i couldnt do it before 11 mins so went offline for sometime... thxn once more
KoolKabin