2011-08-23 53 views
0

我試圖從使用jquery循環插件時生成的尋呼機中刪除號碼。這些數字似乎只在IE中顯示,但我仍然需要刪除它們。我的代碼是:我如何刪除jQuery循環插件中的尋呼機號碼

<div class="feature_span" style="background-color:#000000; background-image: url(images/banner-one.jpg); background-position:top center; background-repeat:repeat-x;" ></div> 
<div class="feature_span" style="background-color:#000000; background-image: url(images/banner-two.jpg); background-position:top center; background-repeat:repeat-x;" ></div> 
<div class="feature_span" style="background-color:#000000; background-image: url(images/banner-one.jpg); background-position:top center; background-repeat:repeat-x;" ></div> 
<div class="feature_span" style="background-color:#000000; background-image: url(images/banner-two.jpg); background-position:top center; background-repeat:repeat-x;" ></div> 

</div><!--End Homepage Slider--> 

<div class="feature_nav"></div> 

<script> 
    // start slideshow 
    $('#homepage_slider').cycle({ 
     timeout: 7000, 
     // before: onBefore , 
     next: '.feature_next', 
     prev: '.feature_prev', 
     pager: '.feature_nav' 
    }); 
</script> 

我敢肯定有這樣做的是我失去了一個簡單的方法。有人可以幫忙嗎?

+2

你的問題很難理解。如果您希望得到適當的答覆,澄清它將會有所幫助。 – HyderA

回答

2

有些文檔可以在這裏找到:http://jquery.malsup.com/cycle/pager2.html

$('#homepage_slider').cycle({ 
    timeout: 7000, 
    // before: onBefore , 
    next: '.feature_next', 
    prev: '.feature_prev', 
    pager: '.feature_nav', 
    pagerAnchorBuilder: function(idx, slide) { 
     return foo; //Where foo is whatever contents you want in each pager anchor. 
    } 
}); 
0

如果你不想尋呼機,那麼從你的代碼中刪除這個。 pager: '.feature_nav'

0

這裏是我的代碼,它工作正常。

HTML

<div id="slider" class="pics"> 
     <img src="images/beach1.jpg" width="200" height="200" /> 
     <img src="images/beach2.jpg" width="200" height="200" /> 
     <img src="images/beach3.jpg" width="200" height="200" /> 
     <img src="images/beach4.jpg" width="200" height="200" /> 
     <img src="images/beach5.jpg" width="200" height="200" /> 
     <img src="images/beach6.jpg" width="200" height="200" /> 
     <img src="images/beach7.jpg" width="200" height="200" /> 
     <img src="images/beach8.jpg" width="200" height="200" /> 
    </div> 
<ol class="pager"></ol> 

JS

$('#slider').cycle({ 
       fx: 'fade', 
     pager: '.pager',  
      // callback fn that creates a thumbnail to use as pager anchor 
      pagerAnchorBuilder: function(idx, slide) { 
          return '<a href="#"></a>'; //what you want ti return like '<li></li>' 
      } 

    }); 

輸出:你可以看到

<ol class="pager"> 
    <a href="#" class=""></a> 
    <a href="#" class="activeSlide"></a> 
</ol> 

尋呼機的輸出,CA爲pager類添加css樣式。

相關問題