在页面的右侧有一些我用 jQuery 制作的标签(配色、摄影和配套)。但是,我注意到 IE(真是令人惊讶)无法识别h2
同伴下的表格和表格上的填充和边框。
普通浏览器可以很好地呈现它,只是 IE 会出现问题。
有任何想法吗?
<div class="tabbedPanels">
<ul class="tabs">
<li class="firstlitab"><a href="#panel1" tabindex="1">COLORWAYS</a></li>
<li><a href="#panel3" tabindex="3">PHOTOGRAPHY</a></li>
<li class="lastlitab"><a href="#panel2" tabindex="2">COMPANIONS</a></li>
</ul>
<div class="panelContainer">
<div id="panel1" class="panel">
<p>content here</p>
</div> <!-- end panel1 -->
<div id="panel2" class="panel">
<table class="w_table">
<h2>Wallpaper</h2>
<tr>
<td><a href="#"><img src="images/products/companions/wallpaper1.jpg" /></a></td>
<td><a href="#"><img src="images/products/companions/wallpaper2.jpg" /></a></td>
<td><a href="#"><img src="images/products/companions/wallpaper3.jpg" /></a></td>
</tr>
</table>
<table class="pf_table">
<h2 class="pfh2">Printed Fabrics</h2>
<tr>
<td><a href="#"><img src="images/products/companions/printedfabrics1.jpg" /></a></td>
<td><a href="#"><img src="images/products/companions/printedfabrics2.jpg" /></a></td>
<td><a href="#"><img src="images/products/companions/printedfabrics3.jpg" /></a></td>
</tr>
</table>
<table class="wf_table">
<h2 class="wfh2">Woven Fabrics</h2>
<tr>
<td><a href="#"><img src="images/products/companions/wovenfabrics1.jpg" /></a></td>
<td><a href="#"><img src="images/products/companions/wovenfabrics2.jpg" /></a></td>
<td><a href="#"><img src="images/products/companions/wovenfabrics3.jpg" /></a></td>
</tr>
</table>
</div> <!-- end panel2 -->
<div id="panel3" class="panel">
<p>content here</p>
</div> <!-- end panel3 -->
</div> <!-- end panelContainer -->
</div> <!-- end tabbedPanels -->
<script>
$(document).ready(function() {
$('.tabs a').click(function() {
// save $(this) in a variable for efficiency
var $this = $(this);
// hide panels
$('.panel').hide();
$('.tabs a.active').removeClass('active');
// add active state to new tab
$this.addClass('active').blur();
// retrieve href from link (is id of panel to display)
var panel = $this.attr('href');
// show panel
$(panel).fadeIn(250);
// don't follow link down page
return(false);
}); // end click
// open first tab
$('.tabs li:eq(2) a').click();
}); // end ready
</script>