Template:Team:Bonn:SlideshowJS

From 2013.igem.org

(Difference between revisions)
 
(8 intermediate revisions not shown)
Line 138: Line 138:
                 // enable pause on hover
                 // enable pause on hover
-
                 if ((settings.hoverpause) && (settings.automatic)) {
+
                 if (settings.hoverpause)
 +
                  if (settings.automatic) {
                     conf_hoverpause();
                     conf_hoverpause();
-
                }
+
              }
                 // conf slide animation
                 // conf slide animation
Line 157: Line 158:
             // TODO: need to accomodate random start for slide transition setting
             // TODO: need to accomodate random start for slide transition setting
-
             if(settings.animtype === 'slide' && !settings.randomstart){
+
             if (settings.animtype === 'slide')
 +
                if(!settings.randomstart) {
                 state.currentindex = 1;
                 state.currentindex = 1;
                 state.currentslide = 2;
                 state.currentslide = 2;
Line 371: Line 373:
             // if the slider is responsive && the calculated width is less than the max width
             // if the slider is responsive && the calculated width is less than the max width
-
             if(settings.responsive && (responsive.width < settings.width)){
+
             if(settings.responsive)
 +
              if ((responsive.width < settings.width)){
                 $canvas.css({
                 $canvas.css({
Line 490: Line 493:
                 marker.on('click','a',function(e){
                 marker.on('click','a',function(e){
                     e.preventDefault();
                     e.preventDefault();
-
                     if(!state.animating && state.currentslide !== gotoslide){
+
                     if(!state.animating)
 +
                      if(state.currentslide !== gotoslide){
                         go(false,gotoslide);
                         go(false,gotoslide);
                     }
                     }
Line 531: Line 535:
                 }
                 }
-
                 if (state.paused && settings.automatic) {
+
                 if (state.paused)
 +
                  if(settings.automatic) {
                     state.interval = setInterval(function () {
                     state.interval = setInterval(function () {
                         go(vars.fwd);
                         go(vars.fwd);
Line 674: Line 679:
                     // if the slider is responsive && the calculated width is less than the max width
                     // if the slider is responsive && the calculated width is less than the max width
-
                     if(settings.responsive && ( responsive.width < settings.width ) ){
+
                     if(settings.responsive)
 +
                      if( responsive.width < settings.width ){
                         state.slidewidth = responsive.width;
                         state.slidewidth = responsive.width;
                     }
                     }
Line 721: Line 727:
})(jQuery);
})(jQuery);
</script>
</script>
 +
</html>

Latest revision as of 18:29, 1 October 2013