1/* 2 Project name: MODELTHEME 3 Project author: ModelTheme 4 File name: Custom JS 5*/ 6 7 8 9 10 11(function ($) { 12 'use strict'; 13 14 jQuery( document ).ready(function() { 15 /* 16 * ||||||||||||||||||||||||||||||||||||||||||||||||||||||||-> TESTIMONIALS01 SLIDER (Shortcode) 17 */ 18 19 20 21 22 /* 23 * ||||||||||||||||||||||||||||||||||||||||||||||||||||||||-> SYNCED SLIDER / MAIN HOME 24 */ 25 function bs_fix_vc_full_width_row(){ 26 var $fullrow = jQuery('[data-vc-full-width="true"]'); 27 jQuery.each($fullrow, function () { 28 jQuery('#mt_posts_carousel_big_centered').owlCarousel({ 29 // center: true, 30 stagePadding: 200, 31 items:1, 32 loop:true, 33 margin:10, 34 nav: true, 35 navText: ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"] 36 // responsive:{ 37 // 600:{ 38 // items:4 39 // } 40 // } 41 }); 42 }); 43 } 44 45 jQuery(document).on('vc-full-width-row', function () { 46 bs_fix_vc_full_width_row(); 47 }); 48 49 50 var sync1 = jQuery("#mt_posts_carousel_big"); 51 var sync2 = jQuery("#mt_posts_carousel_small"); 52 var duration = 300; 53 var thumbs = 3; 54 55 // Sync nav 56 sync1.on('click', '.owl-next', function () { 57 sync2.trigger('next.owl.carousel') 58 }); 59 sync1.on('click', '.owl-prev', function () { 60 sync2.trigger('prev.owl.carousel') 61 }); 62 63 // Start Carousel 64 sync1.owlCarousel({ 65 dots: false, 66 loop: true, 67 items : 1, 68 margin:0, 69 nav : true, 70 navText: ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"] 71 }) 72 .on('dragged.owl.carousel', function (e) { 73 if (e.relatedTarget.state.direction == 'left') { 74 sync2.trigger('next.owl.carousel') 75 } else { 76 sync2.trigger('prev.owl.carousel') 77 } 78 }); 79 80 81 sync2.owlCarousel({ 82 dots: false, 83 loop: true, 84 items : thumbs, 85 margin:0, 86 nav : false, 87 responsive:{ 88 0:{ 89 items:1, 90 nav:false 91 }, 92 600:{ 93 items:1, 94 nav:true 95 }, 96 1000:{ 97 items:3, 98 nav:true, 99 } 100 } 101 }) 102 .on('click', '.owl-item', function() { 103 var i = $(this).index()-(thumbs+1); 104 sync2.trigger('to.owl.carousel', [i, duration, true]); 105 sync1.trigger('to.owl.carousel', [i, duration, true]); 106 }); 107 108 109 110 111 112 // jQuery(".testimonials-container").owlCarousel({ 113 // navigation : false, // Show next and prev buttons 114 // pagination : true, 115 // autoPlay : false, 116 // slideSpeed : 700, 117 // paginationSpeed : 700, 118 // itemsCustom : [ 119 // [0, 1], 120 // [450, 1], 121 // [600, 2], 122 // [700, 2], 123 // [1000, 2], 124 // [1200, 2], 125 // [1400, 2], 126 // [1600, 2] 127 // ] 128 // }); 129 130 // jQuery(".testimonials-container-1").owlCarousel({ 131 // navigation : false, // Show next and prev buttons 132 // pagination : false, 133 // autoPlay : false, 134 // slideSpeed : 700, 135 // paginationSpeed : 700, 136 // itemsCustom : [ 137 // [0, 1], 138 // [450, 1], 139 // [600, 1], 140 // [700, 1], 141 // [1000, 1], 142 // [1200, 1], 143 // [1400, 1], 144 // [1600, 1] 145 // ] 146 // }); 147 // jQuery(".testimonials-container-2").owlCarousel({ 148 // navigation : false, // Show next and prev buttons 149 // pagination : true, 150 // autoPlay : false, 151 // slideSpeed : 700, 152 // paginationSpeed : 700, 153 // itemsCustom : [ 154 // [0, 1], 155 // [450, 1], 156 // [600, 2], 157 // [700, 2], 158 // [1000, 2], 159 // [1200, 2], 160 // [1400, 2], 161 // [1600, 2] 162 // ] 163 // }); 164 // jQuery(".testimonials-container-3").owlCarousel({ 165 // navigation : false, // Show next and prev buttons 166 // pagination : false, 167 // autoPlay : false, 168 // slideSpeed : 700, 169 // paginationSpeed : 700, 170 // itemsCustom : [ 171 // [0, 1], 172 // [450, 1], 173 // [600, 2], 174 // [700, 2], 175 // [1000, 3], 176 // [1200, 3], 177 // [1400, 3], 178 // [1600, 3] 179 // ] 180 // }); 181 182 // /* 183 // * ||||||||||||||||||||||||||||||||||||||||||||||||||||||||-> TESTIMONIALS02 SLIDER (Shortcode) 184 // */ 185 // jQuery(".testimonials02-container").owlCarousel({ 186 // navigation : false, // Show next and prev buttons 187 // pagination : true, 188 // autoPlay : false, 189 // slideSpeed : 700, 190 // paginationSpeed : 700, 191 // singleItem : true 192 // }); 193 194 195 196 // var feed = new Instafeed({ 197 // get: 'tagged', 198 // tagName: 'themerodberg', 199 // clientId: '02b47e1b98ce4f04adc271ffbd26611d', 200 // accessToken: '4087253986.54da896.b87b07b1088d4bf4a220eac9ca3e7ba5', 201 // template: '<div class="mt-ig-item-holder"><a href="{{link}}" class="mt-ig-single-post" target="_blank" id="{{id}}"><img src="{{image}}" /><div class="mt-ig-overlay"><i class="icon-social-instagram icons"></i></div></a></div>', 202 // limit: 8, 203 // resolution: 'low_resolution', 204 // }); 205 // feed.run(); 206 207 208 209 210 211 212 213 // var sync1 = jQuery("#mt_posts_carousel_big"); 214 // var sync2 = jQuery("#mt_posts_carousel_small"); 215 216 // sync1.owlCarousel({ 217 // singleItem : true, 218 // mouseDrag : false, 219 // slideSpeed : 1000, 220 // navigation: true, 221 // navigationText : ["<i class='fa fa-chevron-left'></i>","<i class='fa fa-chevron-right'></i>"], 222 // pagination:false, 223 // afterAction : syncPosition, 224 // responsiveRefreshRate : 200, 225 // }); 226 227 // sync2.owlCarousel({ 228 // items : 3, 229 // itemsDesktop : [1199,3], 230 // itemsDesktopSmall : [979,3], 231 // itemsTablet : [768,3],
232 // itemsMobile : [479,3], 233 // pagination:false, 234 // responsiveRefreshRate : 100, 235 // afterInit : function(el){ 236 // el.find(".owl-item").eq(0).addClass("synced"); 237 // } 238 // }); 239 240 // function syncPosition(el){ 241 // var current = this.currentItem; 242 // $("#mt_posts_carousel_small") 243 // .find(".owl-item") 244 // .removeClass("synced") 245 // .eq(current) 246 // .addClass("synced") 247 // if($("#mt_posts_carousel_small").data("owlCarousel") !== undefined){ 248 // center(current) 249 // } 250 // } 251 252 // $("#mt_posts_carousel_small").on("click", ".owl-item", function(e){ 253 // e.preventDefault(); 254 // var number = $(this).data("owlItem"); 255 // sync1.trigger("owl.goTo",number); 256 // }); 257 258 // function center(number){ 259 // var sync2visible = sync2.data("owlCarousel").owl.visibleItems; 260 // var num = number; 261 // var found = false; 262 // for(var i in sync2visible){ 263 // if(num === sync2visible[i]){ 264 // var found = true; 265 // } 266 // } 267 268 // if(found===false){ 269 // if(num>sync2visible[sync2visible.length-1]){ 270 // sync2.trigger("owl.goTo", num - sync2visible.length+2) 271 // }else{ 272 // if(num - 1 === -1){ 273 // num = 0; 274 // } 275 // sync2.trigger("owl.goTo", num); 276 // } 277 // } else if(num === sync2visible[sync2visible.length-1]){ 278 // sync2.trigger("owl.goTo", sync2visible[1]) 279 // } else if(num === sync2visible[0]){ 280 // sync2.trigger("owl.goTo", num-1) 281 // } 282 283 // } 284 285 // Tabs 286 287 // jQuery('.naccs .menu div').click(function(){ 288 // var tab_id = jQuery(this).attr('data-tab'); 289 290 // jQuery('.naccs .menu div').removeClass('active'); 291 // jQuery('.naccs ul li').removeClass('active'); 292 // jQuery('.naccs .gc--1-of-3').removeClass('active'); 293 // jQuery('.naccs .gc--2-of-3').removeClass('active'); 294 295 296 // jQuery(this).parent().parent().addClass('active'); 297 // jQuery("#"+tab_id).parent().parent().addClass('active'); 298 // jQuery(this).addClass('active'); 299 // jQuery("#"+tab_id).addClass('active'); 300 // }) 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 }); 319} (jQuery) )
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.