猿问

请教一段DIV选项卡代码,JQUERY

<!-- description and features -->
<div id="more_info_block" class="smoothTabs">
<ul id="more_info_tabs" class="idTabs idTabsShort">
<li><a class="selected" id="more_info_tab_more_info" href="#idTab1">Moreinfo</a></li>
<li><a class="mydifineLI2" id="more_info_tab_data_sheet" href="#idTab2">Data sheet</a></li>
</ul>
<div id="more_info_sheets">
<!-- full description -->
<div class="" id="idTab1"><p>Lorem ipsum dolor sit amet, consectetur
adipiscing elit. Aenean sagittis arcu non orci hendrerit in imperdiet
lectus molestie. Curabitur adipiscing felis arcu, at gravida velit. Sed
quis neque sed nibh sagittis lobortis vel nec lacus. Sed ut fermentum
risus.
</p>
</div>
<!-- product's features -->
<div>
<ul class="block_hidden_only_for_screen" id="idTab2">
<li><span>Width:</span> 5"</li>
<li><span>Height:</span> 15"</li>
<li><span>Depth:</span> 5"</li>
<li><span>Weight:</span> 3 kg</li>
<li><span>Size:</span> M</li>
</ul>
</div>
</div>

</div>

 

两个选项卡点击切换,麻烦路过的朋友指点一下。
守着一只汪
浏览 429回答 4
4回答

翻阅古今

$(".more_info_tabs a").click(function(){$(".more_info_sheets div").css("display",'none');$(this.attr("href")).css("display","block");})

跃然一笑

好像不够简洁
随时随地看视频慕课网APP
我要回答