1$(document).ready(function() { 2 3 var nav_elem_count = $('#mtmslider_nav_content .cycle-slide').length; 4 var nav_elem_height = $('#mtmslider_nav_content .cycle-slide:first').height(); 5 var nav_height = nav_elem_count * nav_elem_height; 6 var nav_height_diff = nav_height - (3 * nav_elem_height); 7 8 $('#sliderContent').cycle({ 9 fx: 'scrollHorz', 10 pause: 1, 11 speed: 600, 12 slideResize: 0, 13 pagerEvent: 'click', 14 prev: $("#slide_btn_left"), 15 next: $("#slide_btn_right"), 16 pager: '#nav', 17 pagerAnchorBuilder: function(idx, slide) { 18 return '#nav li:eq(' + idx + ') a'; 19 } 20 }); 21 22 23 /* calc main slider width 24 if($('#mtmslider_nav').is(':hidden')) { 25 $('#mtmslider_content').css('width', '100%'); 26 }else { 27 var newWidth = $('#mtmslider_content').parent().width() - 217; 28 $('#mtmslider_content').css('width', newWidth + 'px'); 29 } 30 31 $('#mtmslider_nav .cycle-slide').on('click', function(){ 32 var index = $('#mtmslider_nav_content').data('cycle.API').getSlideIndex(this); 33 $('#mtmslider_content').cycle('goto',index); 34 }); 35 */ 36 37 // load additional slides 38 $('#slides').find('.mtmslider_element').each(function() { 39 $('#mtmslider_content').cycle('add', $(this)); 40 }); 41 42 $('#slides').remove(); 43 44 45 // slider nav buttons 46 $('#mtmslider_nav_up').hide(); 47 48 $('#slide_btn_left').on('click', function() { 49 $('#mtmslider_nav_content').cycle('prev'); 50 }); 51 52 $('#slide_btn_right').on('click', function() { 53 $('#mtmslider_nav_content').cycle('next'); 54 }); 55 56 $('#mtmslider_nav').on('cycle-next cycle-prev',function(e,opts){ 57 58 if(opts.currSlide == 0) { 59 $('#mtmslider_nav_up').hide(); 60 }else { 61 if($('#mtmslider_nav_up').is(':hidden')) { 62 $('#mtmslider_nav_up').show(); 63 } 64 } 65 66 if(opts.currSlide == (opts.slideCount - 3)) { 67 $('#mtmslider_nav_down').hide(); 68 }else { 69 if($('#mtmslider_nav_down').is(':hidden')) { 70 $('#mtmslider_nav_down').show(); 71 } 72 } 73 74 }); 75 76 $('#mtmslider_nav_up').mouseenter(function(){ 77 $(this).css('background', '#000000 url("typo3conf/ext/mtmslider/Resources/Public/images/template1/pfeil_hoch.png") no-repeat center center'); 78 }).mouseleave(function(){ 79 $(this).css('background', 'none'); 80 }); 81 82 $('#mtmslider_nav_down').mouseenter(function(){ 83 $(this).css('background', '#000000 url("typo3conf/ext/mtmslider/Resources/Public/images/template1/pfeil_runter.png") no-repeat center center'); 84 }).mouseleave(function(){ 85 $(this).css('background', 'none'); 86 }); 87 88 89 90 91 // on resize 92 $(window).on('resize', function () { 93 94 /* calc main slider width 95 if($('#mtmslider_nav').is(':hidden')) { 96 $('#mtmslider_content').css('width', '100%'); 97 }else { 98 var newWidth = $('#mtmslider_content').parent().width() - 217; 99 $('#mtmslider_content').css('width', newWidth + 'px'); 100 }*/ 101 102 $('#mtmslider_nav').height($('#mtmslider_content').height()); 103 /*$('#mtmslider_nav .cycle-slide img').each(function(){ 104 $(this).css({'width':'auto', 'height':$('#mtmslider_content').height() / 3 + 'px'}); 105 });*/ 106 107 }); 108 109 110});
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.