Ignore:
Timestamp:
May 8, 2014, 1:09:58 PM (10 years ago)
Author:
Miklfe
Message:

Ajout de la navigation avec la molette de la sourie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Slim/template/index.tpl

    r28012 r28392  
    22{$MENUBAR}
    33{/if}
     4
     5{combine_script id='mousewheel' load='header' require='jquery' path='themes/Slim/js/mousewhell.js'}
    46
    57<div id="content" class="content{if isset($MENUBAR)} contentWithMenu{/if}">
     
    166168        $('.jcarousel')
    167169            .jcarousel({
    168                  wrap: 'circular'
     170                 wrap: 'circular',
    169171            })         
    170172                        .jcarouselAutoscroll({
     
    193195                target: '+=1'
    194196            });
     197                       
     198    $('.jcarousel').mousewheel(function(event, delta) {
     199        if (delta > 0)
     200            {$('.jcarousel').jcarousel('scroll', '-=1')}
     201        else if (delta < 0)
     202            {$('.jcarousel').jcarousel('scroll', '+=1')}
     203        });
     204
     205//};   
     206               
    195207{/literal}{/footer_script}
    196208
     
    240252                                $(this).jcarouselAutoscroll('start')
    241253                        });
     254               
     255                $('.jcarousel').mousewheel(function(event, delta) {
     256        if (delta > 0)
     257            {$('.jcarousel').jcarousel('scroll', '-=1')}
     258        else if (delta < 0)
     259            {$('.jcarousel').jcarousel('scroll', '+=1')}
     260        });
     261
    242262{/literal}{/footer_script}
    243263
Note: See TracChangeset for help on using the changeset viewer.