Changeset 31793
- Timestamp:
- Apr 21, 2017, 2:52:33 PM (7 years ago)
- Location:
- extensions/MenuRandomPhoto/template
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/MenuRandomPhoto/template/menu_random_photo.js.tpl
r30050 r31793 14 14 ] 15 15 }; 16 17 $(function() { 18 $('#imrp_ill0').width({$data.blockHeight}); 19 $('#imrp_ill0').height({$data.blockHeight}); 20 21 var randomPict = MRP_Opt['pictures']; 22 if (randomPict.length > 1) { 23 $('#imrp_ill0 a').attr("href", randomPict[0]['link']); 24 $('#imrp_ill0 img').attr("src", randomPict[0]['thumb']); 25 26 var nextFaderPos = 1; 27 var duration = 400; 28 var pause = false; 29 30 $('#imrp_ill0 img').after('<img id="irmbRPicImg">'); 31 $('#imrp_ill0 img').eq(1).hide(); 32 $('#imrp_ill0 img')[1].src = randomPict[1]['thumb']; 33 $('#imrp_ill0 img').css('position', 'absolute'); 34 35 $('#imrp_ill0').hover(function() { 36 pause = true; 37 },function() { 38 pause = false; 39 }); 40 41 function doRotate() { 42 if ($('#imrp_ill0 img')[1].complete) { 43 if(!pause) { 44 $('#imrp_ill0 img').first().fadeOut(duration, function() { 45 nextFaderPos = (nextFaderPos + 1) % randomPict.length; 46 $('#imrp_ill0 img')[1].src = randomPict[nextFaderPos]['thumb']; 47 }); 48 $('#imrp_ill0 img').first().insertAfter($('#imrp_ill0 img').eq(1)); // swap 49 $('#imrp_ill0 img').first().fadeIn(duration); 50 setTimeout(function() { 51 $('#imrp_ill0 a').attr("href", randomPict[nextFaderPos]['link']); 52 }, duration/3); 53 } 54 } 55 } 56 57 var rotate = setInterval(doRotate, {$data.delay}); 58 } 59 }); 16 var MRP_blockHeight={$data.blockHeight}; 17 var MRP_delay={$data.delay}; 60 18 </script> -
extensions/MenuRandomPhoto/template/menu_random_photo.tpl
r30050 r31793 1 1 {combine_css path="plugins/MenuRandomPhoto/mrp.css"} 2 {combine_script id="MRPscript" require="jquery" path="plugins/MenuRandomPhoto/mrp.js"} 2 3 <!-- random picture menu bar --> 3 4 <dt>{$block->get_title()}</dt>
Note: See TracChangeset
for help on using the changeset viewer.