Javascript 当我们使用jquery单击verticl选项卡时,如何显示页眉 HTML:
您应该添加以下样式“overflow:hidden;”,并删除类名为about\u content\u for ProductTilt10的div的height属性Javascript 当我们使用jquery单击verticl选项卡时,如何显示页眉 HTML:,javascript,jquery,html,css,Javascript,Jquery,Html,Css,您应该添加以下样式“overflow:hidden;”,并删除类名为about\u content\u for ProductTilt10的div的height属性 此外,使用更通用的类名也是一个不错的选择,在您的案例中,使用“产品描述”和“关于产品内容…”是一个不错的选择。您好,非常感谢。如何显示网页标题。请查看我的屏幕截图:谢谢。我需要看到标记以帮助您。但无论如何,您应该更多地依赖于浏览器自然流(使用dislay块和inline块),而不是浮动。 <ul> <li
此外,使用更通用的类名也是一个不错的选择,在您的案例中,使用“产品描述”和“关于产品内容…”是一个不错的选择。您好,非常感谢。如何显示网页标题。请查看我的屏幕截图:谢谢。我需要看到标记以帮助您。但无论如何,您应该更多地依赖于浏览器自然流(使用dislay块和inline块),而不是浮动。
<ul>
<li><a href="#a1">a1</a></li>
<li><a href="#b1">b1</a></li>
</ul>
<div id="sections">
<div class="section" id="a">
</div>
<div class="section" id="b">
</div>
$(document).ready(function(){
if (
$('ul#verticalNav li a').length &&
$('div.section').length
) {
$('div.section').css( 'display', 'none' );
//$('ul#verticalNav li a').each(function() {
$('ul#verticalNav li a').click(function() {
showSection( $(this).attr('href') );
});
// if hash found then load the tab from Hash id
if(window.location.hash)
{
// to get the div id
showSection( window.location.hash);
}
else // if no hash found then default first tab is opened
{
$('ul#verticalNav li:first-child a').click();
}
}
});
</script>
function showSection( sectionID ) {
$('div.section').css( 'display', 'none' );
$('div'+sectionID).css( 'display', 'block' );
}
$(document).ready(function(){
if (
$('ul#verticalNav li a').length &&
$('div.section').length
) {
$('div.section').css( 'display', 'none' );
//$('ul#verticalNav li a').each(function() { // no need for each loop
$('ul#verticalNav li a').click(function() { // Use $('ul#verticalNav li a').click
showSection( $(this).attr('href') );
});
//});
if(window.location.hash) // if hash found then load the tab from Hash id
{
showSection( window.location.hash);// to get the div id
}
else // if no hash found then default first tab is opened
{
$('ul#verticalNav li:first-child a').click();
}
}
});