1/** 2 3* 4 5* ----------------------------------------------------------------------------- 6 7* 8 9* Template : Grassy - Business & Corporate Wordpress Theme 10 11* Author : rs-theme 12 13* Author URI : http://www.rstheme.com/ 14 15* 16 17* ----------------------------------------------------------------------------- 18 19* 20 21**/ 22(function($) { 23 24 "use strict"; 25 26 // Add "loaded" class when a section has been loaded 27 28 $(window).scroll(function() { 29 30 var scrollTop = $(window).scrollTop(); 31 32 $("section").each(function() { 33 34 var elementTop = $(this).offset().top - $('#rs-header').outerHeight(); 35 36 if(scrollTop >= elementTop) { 37 38 $(this).addClass('loaded'); 39 40 } 41 42 }); 43 44 }); 45 46 // Sticky Navbar Affix 47 48 $('.menu-sticky').affix({ 49 50 offset: { 51 52 top: $('.toolbar-area').outerHeight(), 53 54 } 55 56 }); 57 58 59 // video 60 61 if ($('.player').length) { 62 63 $(".player").YTPlayer(); 64 65 } 66 67 // image loaded portfolio init 68 69 $('.grid').imagesLoaded(function() { 70 71 $('.portfolio-filter').on('click', 'button', function() { 72 73 var filterValue = $(this).attr('data-filter'); 74 75 $grid.isotope({ 76 77 filter: filterValue 78 79 }); 80 81 }); 82 83 var $grid = $('.grid').isotope({ 84 85 itemSelector: '.grid-item', 86 87 percentPosition: true, 88 89 masonry: { 90 91 columnWidth: '.grid-item', 92 93 } 94 95 }); 96 97 }); 98 99 100 101 // portfolio Filter 102 103 $('.portfolio-filter button').on('click', function(event) { 104 105 $(this).siblings('.active').removeClass('active'); 106 107 $(this).addClass('active'); 108 109 event.preventDefault(); 110 111 }); 112 113 114 115 116 117 // magnificPopup init 118 119 $('.image-popup').magnificPopup({ 120 121 type: 'image', 122 123 callbacks: { 124 125 beforeOpen: function() { 126 127 this.st.image.markup = this.st.image.markup.replace('mfp-figure', 'mfp-figure animated zoomInDown'); 128 129 } 130 131 }, 132 133 gallery: { 134 135 enabled: true 136 137 } 138 139 }); 140 141 142 143 // Get a quote popup 144 145 146 147 $('.popup-quote').magnificPopup({ 148 149 type: 'inline', 150 151 preloader: false, 152 153 focus: '#qname', 154 155 removalDelay: 500, //delay removal by X to allow out-animation 156 157 // When elemened is focused, some mobile browsers in some cases zoom in 158 159 // It looks not nice, so we disable it: 160 161 callbacks: { 162 163 beforeOpen: function() { 164 165 this.st.mainClass = this.st.el.attr('data-effect'); 166 167 if($(window).width() < 700) { 168 169 this.st.focus = false; 170 171 } else { 172 173 this.st.focus = '#qname'; 174 175 } 176 177 } 178 179 } 180 181 }); 182 183 184 // team init 185 186 $(".team-carousel").each(function() { 187 var options = $(this).data('carousel-options'); 188 $(this).owlCarousel(options); 189 }); 190 191 192 // testimonial init 193 194 $('.testi-carousel').slick({ 195 196 centerMode: true, 197 198 centerPadding: '0px', 199 200 slidesToShow: 3, 201 202 focusOnSelect: true, 203 204 responsive: [ 205 206 { 207 208 breakpoint: 768, 209 210 settings: { 211 212 arrows: false, 213 214 centerMode: true, 215 216 centerPadding: '0px', 217 218 slidesToShow: 3 219 220 } 221 222 }, 223 224 { 225 226 breakpoint: 480, 227 228 settings: { 229 230 arrows: false, 231 232 centerMode: true, 233 234 centerPadding: '0px', 235 236 slidesToShow: 1 237 238 } 239 240 } 241 242 ] 243 244 }); 245 246 247 248 249 250 $(".testi-item a.tab").on('click', function(e){ 251 252 e.preventDefault(); 253 254 slideIndex = $(this).index(); 255 256 $( '.testi-carousel' ).slickGoTo( parseInt(slideIndex) ); 257 258 }); 259 260 261 262 /*------------------------------------- 263 264 Main Menu jQuery activation code 265 266 -------------------------------------*/ 267 268 $(".menu li a") 269 270 .on("click", function(e) { 271 272 var link = $(this); 273 274 275 276 var item = link.parent("li"); 277 278 279 280 if (item.hasClass("active-open")) { 281 282 item.removeClass("active-open").children("a").removeClass("active-open"); 283 284 } else { 285 286 item.addClass("active-open").children("a").addClass("active-open"); 287 288 } 289 290 291 292 if (item.children("ul").length > 0) { 293 294 var href = link.attr("href"); 295 296 link.attr("href", "#"); 297 298 setTimeout(function () { 299 300 link.attr("href", href); 301 302 }, 300); 303 304 e.preventDefault(); 305 306 } 307 308 }) 309 310 .each(function() { 311 312 var link = $(this); 313 314 if (link.get(0).href === location.href) { 315 316 link.addClass("active-open").parents("li").addClass("active-open"); 317 318 return false;
319 320 } 321 322 }); 323 324 325 326 //window Load Remove Class 327 328 $(window).on( 'load', function() { 329 330 $('.menu li').removeClass('active-open'); 331 332 }) 333 334 335 336 // Canvas Menu Js 337 338 $(".sidenav #menu-canvas-menu .menu-item-has-children").prepend("<span class='togglearrow'><i class='fa fa-chevron-down'></i></span>"); 339 340 $(".sidenav").on("click", "#menu-canvas-menu .menu-item-has-children", function(){ 341 $('ul',this).slideToggle(); 342 }); 343 344 $( ".nav-link-container > a" ).on('click', function(event){ 345 346 $(".nav-link-container").toggleClass("nav-inactive-menu-link-container"); 347 348 $(".sidenav").toggleClass("nav-active-menu-container"); 349 $(".nav-container").toggleClass("flip"); 350 $(".off-canvas-overlay").toggleClass("open"); 351 352 }); 353 354 355 356 $(".nav-close-menu-li > a").on('click', function(event){ 357 358 $(".sidenav").toggleClass("nav-active-menu-container"); 359 360 $(".content").toggleClass("inactive-body"); 361 $(".nav-container").toggleClass("flip"); 362 $(".off-canvas-overlay").toggleClass("open"); 363 364 }); 365 366 $(".off-canvas-overlay").on('click', function(event){ 367 368 $(".sidenav").toggleClass("nav-active-menu-container"); 369 370 $(".content").toggleClass("inactive-body"); 371 $(".nav-container").toggleClass("flip"); 372 $(".off-canvas-overlay").toggleClass("open"); 373 374 }); 375 376 377 378 // blog init 379 380 $(".blog-carousel").each(function() { 381 var options = $(this).data('carousel-options'); 382 $(this).owlCarousel(options); 383 }); 384 385 386 // partner init 387 388 $(".partner-carousel").each(function() { 389 var options = $(this).data('carousel-options'); 390 $(this).owlCarousel(options); 391 }); 392 393 394 395 $('.sticky_search').on('click', function(event) { 396 397 $('.sticky_form').toggle('show'); 398 399 }); 400 401 402 403 //preloader 404 405 $(window).on('load', function() { 406 407 $(".preloader").delay(2000).fadeOut(500); 408 409 $(".sk-cube-grid").on('click', function() { 410 411 $(".preloader").fadeOut(500); 412 413 }) 414 415 }) 416 417 418 419 // Counter Up 420 421 $('.rs-counter').counterUp({ 422 423 delay: 20, 424 425 time: 1500 426 427 }); 428 429 $(function(){ 430 $( "ul.children" ).addClass( "sub-menu" ); 431 }); 432 433 // scrollTop init 434 435 var win=$(window); 436 437 var totop = $('#scrollUp'); 438 439 win.on('scroll', function() { 440 441 if (win.scrollTop() > 150) { 442 443 totop.fadeIn(); 444 445 } else { 446 447 totop.fadeOut(); 448 449 } 450 451 }); 452 453 totop.on('click', function() { 454 455 $("html,body").animate({ 456 457 scrollTop: 0 458 459 }, 500) 460 461 }); 462 463 464})(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.