2012-10-19 45 views
1

我使用jCarouselLite在顯示頁面中顯示重要事件,但是當我只添加單個事件時,它不顯示(同時顯示頁面上顯示多個事件並且自動滾動正常工作)。 。jCarouselLite autoscroll not show one enty

這裏是我的代碼: -

 .scroll{:style=>"margin:5px 0 0 10px;"} 
     -if @individual.important_events.present? 
      %ul 
      [email protected]_events.each do |event| 
       %li 
       = link_to event.title, important_events_path 
       %br 
       = event.date 

和文字是: -

:javascript  
    $(function() { 
    $(".scroll").jCarouselLite({ 
     auto: 800, 
     speed: 1000, 
     vertical: true, 
     circular: true 
    }); 
    }); 

我怎樣才能顯示我的節目頁面事件的單一入口?

回答

0

這是否工作:

.scroll{:style=>"margin:5px 0 0 10px;"} 
     %ul 
     [email protected]_events.each do |event| 
      %li 
      = link_to event.title, important_events_path(event) 
      %br 
      = event.date