我目前在我的网站上有一个简单的选项卡系统。然而,我试图实现一个涉及用jQuery调用项目的第三方审查系统。jQuery选项卡不加载jquery选项卡
现在,如果没有noConflict
只是运行标签,标签系统将无法正常工作,我相信这可能会导致问题。有没有什么办法解决这一问题?
实例:[REMOVED LINK]
JQUERY
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>var $jagcookies = jQuery.noConflict(true);</script>
<script type='text/javascript'>
$jagcookies(document).ready(function(){
$("#tabs li").click(function() {
// First remove class "active" from currently active tab
$("#tabs li").removeClass('active');
// Now add class "active" to the selected/clicked tab
$(this).addClass("active");
// Hide all tab content
$(".tabContent").hide();
// Here we get the href value of the selected tab
var selected_tab = $(this).find("a").attr("href");
// Show the selected tab content
$(selected_tab).show();
// At the end, we add return false so that the click on the link is not executed
return false;
});
});
/* ]]> */
</script>
HTML
<ul id="tabs">
<li><a href="#tab1">Description</a></li>
<li><a href="#tab2">Video</a></li>
<li><a href="#tab3">Map</a></li>
<li><a href="#tab4">Downloads</a></li>
<li><a href="#tab5">Reviews</a></li>
</ul>
<div id="content">
<div id="tab1" class="tabContent">
<span class="productDescription">
</span>
</div>
<div id="tab2" class="tabContent">
<iframe width="600" height="390" src="link" frameborder="0" allowfullscreen></iframe>
</div>
<div id="tab3" class="tabContent">
<iframe width="600" height="390" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=#maps&ie=UTF8&z=7&t=m&iwloc=near&output=embed"></iframe>
</div>
<div id="tab4" class="tabContent">
<table id="download-blocks">
<tr>
</tr>
<tr>
</tr>
<tr> </tr>
</table>
</div>
<div id="tab5" class="tabContent">
<div class="yotpo reviews"
data-appkey="**"
data-domain="http://**"
data-product-id="#Alias"
data-product-models="Products model information"
data-name="#NameOrAlias"
data-url="#FUNCTION("BASEURL", #Shop, 1)#Path[url]"
data-image-url="**"
data-description="#IF(#LongDescription)#LongDescription[nohtml,html]#ELSE#Description[nohtml,html]#ENDIF"
data-bread-crumbs="#LOCAL("MainCategory", #MainCategory)#IF(#MainCategory)#IF(#Shop.Child.Pages.Child.SpecialOffers.ID == #MainCategory.ID){SpecialOffers}#ELSE#LOOP(#MainCategory.PathFromSite) #NameOrAlias/#ENDLOOP#ENDIF#ENDIF#ENDLOCAL"></div>
</div>
</div>
如果你可以在'document.ready()'中使用'$ jagcookies',那么为什么不用其他'$'s? –