开发者

focus on content within the link

开发者 https://www.devze.com 2023-03-09 20:24 出处:网络
Below is some html code that i am trying to store collapsible div tags I am having a problem that when i click on the link Overland Expo April27 2011 which is contained along with other links which ex

Below is some html code that i am trying to store collapsible div tags

I am having a problem that when i click on the link Overland Expo April27 2011 which is contained along with other links which expand within the adventure diaries div, that focus is going to the top of the page. I want when you click on one of the links that focus remains on the content within that collapsible link div. Dose anyone have some advice please

   <!--<div> <a href="#para2"><a href="#" onclick="return toggleMe('para1')"/><h3>Click for adventure diaries</h3></a><br/>

 <link="para2" style="display:none">< link="#" onclick="return toggleMe('para1')" /></a>  
 <div id="para1" style="display:none">  

开发者_开发百科<p class="myTab" id="test">Content
</p


 </div><!-- end of first date --> -->


See your onclick="return toggleMe('para1')"

When the onclick function returns false, the link does nothing -- so it won't take the page to #.

You need to change toggleMe to return false.

0

精彩评论

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