我的jQuery标签不会在IE8或IE7中呈现。我检查了主页上的jQuery选项卡,它们似乎很好。这在所有其他浏览器中呈现没有问题。我错过了IE需要的东西吗?我附上了IE中的图像。这是我的代码:
var tabcontent1 = "<article id='tabs-min' class='tabs ui-tabs ui-widget ui-widget-content ui-corner-all'><ul class='ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all'><li class='ui-state-default ui-corner-top'><a href='#tabs-min-1'>Description</a></li>";
var tabcontent2 = "<div id='tabs-min-1'><p>"+ description +"</p></div>";
if(jQuery('.features-label').size() > 0){
var featureslabel = jQuery(".features-label").text();
}
if(jQuery('.technical-label').size() > 0){
var technicallabel = jQuery(".technical-label").text();
}
if(jQuery('.owners-label').size() > 0){
var ownerslabel = jQuery(".owners-label").text();
}
if(jQuery('#tab_image').size() > 0){
var imagelabel = "Image";
var imagetext = jQuery("#tab_image").text();
}
if(jQuery('.features-text').size() > 0){
var featurestext = jQuery(".features-text").html();
}
if(jQuery('.technical-text').size() > 0){
var technicaltext = jQuery(".technical-text").html();
}
if(jQuery('.owners-text').size() > 0){
var ownerstext = jQuery(".owners-text").html();
}
if (featurestext != null){
var tabcontent1 = tabcontent1 + "<li class='ui-state-default ui-corner-top'><a href='#tabs-min-2'>"+ featureslabel +"</a></li>";
var tabcontent2 = tabcontent2 + "<div id='tabs-min-2'><p>"+ featurestext +"</p></div>";
}
if (technicaltext != null){
var tabcontent1 = tabcontent1 + "<li class='ui-state-default ui-corner-top'><a href='#tabs-min-3'>"+ technicallabel +"</a></li>";
var tabcontent2 = tabcontent2 + "<div id='tabs-min-3'><p>"+ technicaltext +"</p></div>";
}
if (ownerstext != null){
var tabcontent1 = tabcontent1 + "<li class='ui-state-default ui-corner-top'><a href='#tabs-min-4'>"+ ownerslabel +"</a></li>";
var tabcontent2 = tabcontent2 + "<div id='tabs-min-4'><p>"+ ownerstext +"</p></div>";
}
if (imagetext != null){
var tabcontent1 = tabcontent1 + "<li class='ui-state-default ui-corner-top'><a href='#tabs-min-5'>"+ imagelabel +"</a></li>";
var tabcontent2 = tabcontent2 + "<div id='tabs-min-5'><p><img src='/v/images_tabs/"+ imagetext +"'></p></div>";
}
//LOAD THE TABS
jQuery("#test123").before(tabcontent1 + "</ul>" + tabcontent2 + "</article>");
jQuery(function() {
jQuery( "#tabs-min" ).tabs();
});
答案 0 :(得分:1)
问题是“文章”。 IE不喜欢这样。将其更改为div。
<article id='tabs-min'
应该是
<div id='tabs-min'