Ignore:
Timestamp:
Jun 1, 2014, 7:10:51 PM (10 years ago)
Author:
Miklfe
Message:

Slim 2.0 release1

File:
1 edited

Legend:

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

    r28556 r28581  
    77
    88{footer_script}{literal}
    9 $(document).ready(function () {
    10         var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)),
    11                 start;
     9(function($) {
     10        $(document).ready(function(){
    1211       
    13         if (isTouch==true){
    14         start="";
    15         }else{
    16         start="onStart";
    17         };
     12                var isTouch = (('ontouchstart' in window) || (navigator.msMaxTouchPoints > 0)),
     13                        start;
     14               
     15                if (isTouch==true){
     16                start="";
     17                }else{
     18                start="onStart";
     19                };
     20               
     21                $("div.carousel").smoothDivScroll({
     22                        autoScrollingMode: start,
     23                        touchScrolling: true,
     24                        autoScrollingStep: {/literal}{$Slim.carousel_speed}{literal},
     25                        manualContinuousScrolling: true,
     26                        mousewheelScrolling: "allDirections",
     27               
     28                });     
     29                               
     30                $("div.carousel").bind("mouseover", function() {
     31                        $(this).smoothDivScroll("stopAutoScrolling");
     32                }).bind("mouseout", function() {
     33                        $(this).smoothDivScroll("startAutoScrolling");
     34                });     
    1835       
    19         $("div.carousel").smoothDivScroll({
    20                 autoScrollingMode: start,
    21                 touchScrolling: true,
    22                 autoScrollingStep:5,
    23                 mousewheelScrolling: "allDirections",
    24                 manualContinuousScrolling: true,
    25         });     
    26                        
    27         $("div.carousel").bind("mouseover", function() {
    28                 $(this).smoothDivScroll("stopAutoScrolling");
    29         }).bind("mouseout", function() {
    30                 $(this).smoothDivScroll("startAutoScrolling");
    31         });     
    32        
    33        
    34         $('.fancybox').fancybox({
    35                 helpers : {
    36                 title : {
    37                         type : 'over'
    38                 },
    39                 },     
    40                 afterLoad: function() {
    41                 $("div.carousel").smoothDivScroll("stopAutoScrolling");
    42                 },
    43                 afterClose: function() {
    44                 $("div.carousel").smoothDivScroll("startAutoScrolling");
    45                 }
     36               
    4637        });
    47 });
     38})(jQuery);
    4839{/literal}{/footer_script}
    4940
     41{if (($Slim.style_slim)!=3)}
     42{footer_script}{literal}
     43(function($) {
     44        $(document).ready(function(){
     45                $('.fancybox').fancybox({
     46                        helpers : {
     47                                title : {
     48                                        type : 'over'
     49                                },
     50                        },     
     51                        afterLoad: function() {
     52                        $("div.carousel").smoothDivScroll("stopAutoScrolling");
     53                        },
     54                        afterClose: function() {
     55                        $("div.carousel").smoothDivScroll("startAutoScrolling");
     56                        }
     57                });             
    5058               
    51                        
    52 
     59        });
     60})(jQuery);
     61{/literal}{/footer_script}
     62{/if}
    5363
    5464        <div class="carousel">
Note: See TracChangeset for help on using the changeset viewer.