2011-01-24 8 views
0

nivo-controlNav a<span>タグをラップします。jQueryを使用して.nivo-controlNav(Nivoスライダー)のアンカータグをラップすることはできません。

JS/custom.js:

var $j = jQuery.noConflict(); 

$j(document).ready(function() { 
$j(".nivo-controlNav a").wrap("<span></span>"); 
}); 

header.phpの:

<!-- Include the Nivo Slider JS file --> 
<script src="<?php bloginfo("template_url"); ?>/js/nivo-slider/jquery.nivo.slider.pack.js" type="text/javascript"></script> 
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/PIE.js"></script> 
<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/custom.js"></script> 
<!-- Set up the Nivo Slider --> 
<script type="text/javascript"> 
jQuery(window).load(function() { 
    jQuery('#slider').nivoSlider(); 
}); 
</script> 
</head> 

しかし、それは動作しません。

私はこの試みた:

var $j = jQuery.noConflict(); 

$j(document).ready(function() { 
$j("h2").wrap("<span></span>"); 
}); 

をし、それが仕事をしました。

提案がありますか?

答えて

0

多分あなたのためにそれをチェックしてください。

var $j = jQuery.noConflict(); 

$j(document).ready(function() { 
$j(".nivo-controlNav a").wrap("<span/>"); 
}); 
関連する問題