1 //RESPONSIVE 2jQuery(function () { 3 var sliderHeight = "480px"; 4 if ($(window).width() < 991) { 5 sliderHeight = "300px"; 6 } 7 8 jQuery("#camera_wrap_3").camera({ 9 height: sliderHeight, 10 mobileNavHover: true, 11 easing: 'easeInOutExpo', 12 // fx:'random', 13 onEndTransition: function() { 14 vertiAlign(); 15 }, 16 onLoaded: function () { 17 vertiAlign () ; 18 } 19 }); 20 21 (function($) { 22 var MutationObserver = window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver; 23 24 $.fn.attrchange = function(callback) { 25 if (MutationObserver) { 26 var options = { 27 subtree: false, 28 attributes: true 29 }; 30 31 var observer = new MutationObserver(function(mutations) { 32 mutations.forEach(function(e) { 33 callback.call(e.target, e.attributeName); 34 }); 35 }); 36 37 return this.each(function() { 38 observer.observe(this, options); 39 }); 40 41 } 42 } 43 })(jQuery); 44 45//Now you need to append event listener 46 jQuery('.camera_src').attrchange(function(attrName) { 47 cameraLoadCheck(); 48 if(attrName==='camerastarted'){ 49 cameraLoadCheck(); 50 }else{ 51 cameraLoadCheck(); 52 } 53 54 }); 55 56 57 var mut = new MutationObserver(function(mutations, mut){ 58 if (mut.attributeName === 'cameracurrent') { 59 60 } 61 else 62 { 63 } 64 65 }); 66 mut.observe(document.querySelector(".camerasliding"),{ 67 'attributes': true 68 }); 69 70}); 71 72 function cameraLoadCheck(){ 73 var parentHeight = $(".camera_caption ").height(); 74 var childHeight = $("div.vertical-align").height(); 75 $(".vertical-align").css("margin-top", (parentHeight - childHeight) / 2); 76 77} 78 79function vertiAlign () {
80 //Center the newsy slide text block 81 /*var slideHeight = $(".camera_caption").innerHeight() / 2; 82 var captionHeight = $('.camera_caption_content').innerHeight() / 2; 83 $(".camera_caption").css({ "padding-top": (slideHeight - captionHeight) });*/ 84 //console.log(slideHeight); 85} 86
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.