1/** 2 * WordPress Front End Enhancements. 3 * 4 * jQuery effects used in theme. 5 */ 6 7/* ---------------------------------------------------------------------------------- 8 FORMAT FOOTER LAYOUT 9---------------------------------------------------------------------------------- */ 10jQuery(document).ready(function(){ 11 12jQuery('#footer-core .widget-area:last-child').addClass("last"); 13 14// Footer - Footer Widgets Layout (Options 1 - 6) 15jQuery('#footer-core.option2 .widget-area').addClass("one_half"); 16jQuery('#footer-core.option3 .widget-area').addClass("one_third"); 17jQuery('#footer-core.option4 .widget-area').addClass("one_fourth"); 18jQuery('#footer-core.option5 .widget-area').addClass("one_fifth"); 19jQuery('#footer-core.option6 .widget-area').addClass("one_sixth"); 20 21// Footer - Footer Widgets Layout (Option 7) 22jQuery('#footer-core.option7 #footer-col1.widget-area').addClass("one_third"); 23jQuery('#footer-core.option7 #footer-col2.widget-area').addClass("two_third"); 24 25// Footer - Footer Widgets Layout (Option 8) 26jQuery('#footer-core.option8 #footer-col1.widget-area').addClass("two_third"); 27jQuery('#footer-core.option8 #footer-col2.widget-area').addClass("one_third"); 28 29// Footer - Footer Widgets Layout (Option 9) 30jQuery('#footer-core.option9 #footer-col1.widget-area').addClass("one_fourth"); 31jQuery('#footer-core.option9 #footer-col2.widget-area').addClass("three_fourth"); 32 33// Footer - Footer Widgets Layout (Option 10) 34jQuery('#footer-core.option10 #footer-col1.widget-area').addClass("three_fourth"); 35jQuery('#footer-core.option10 #footer-col2.widget-area').addClass("one_fourth"); 36 37// Footer - Footer Widgets Layout (Option 11) 38jQuery('#footer-core.option11 #footer-col1.widget-area').addClass("one_fifth"); 39jQuery('#footer-core.option11 #footer-col2.widget-area').addClass("four_fifth"); 40 41// Footer - Footer Widgets Layout (Option 12) 42jQuery('#footer-core.option12 #footer-col1.widget-area').addClass("four_fifth"); 43jQuery('#footer-core.option12 #footer-col2.widget-area').addClass("one_fifth"); 44 45// Footer - Footer Widgets Layout (Option 13) 46jQuery('#footer-core.option13 #footer-col1.widget-area').addClass("one_sixth"); 47jQuery('#footer-core.option13 #footer-col2.widget-area').addClass("one_sixth"); 48jQuery('#footer-core.option13 #footer-col3.widget-area').addClass("one_sixth"); 49jQuery('#footer-core.option13 #footer-col4.widget-area').addClass("one_half"); 50 51// Footer - Footer Widgets Layout (Option 14) 52jQuery('#footer-core.option14 #footer-col1.widget-area').addClass("one_half"); 53jQuery('#footer-core.option14 #footer-col2.widget-area').addClass("one_sixth"); 54jQuery('#footer-core.option14 #footer-col3.widget-area').addClass("one_sixth"); 55jQuery('#footer-core.option14 #footer-col4.widget-area').addClass("one_sixth"); 56 57// Footer - Footer Widgets Layout (Option 15) 58jQuery('#footer-core.option15 #footer-col1.widget-area').addClass("one_sixth"); 59jQuery('#footer-core.option15 #footer-col2.widget-area').addClass("one_third"); 60jQuery('#footer-core.option15 #footer-col3.widget-area').addClass("one_half"); 61 62// Footer - Footer Widgets Layout (Option 16) 63jQuery('#footer-core.option16 #footer-col1.widget-area').addClass("one_half"); 64jQuery('#footer-core.option16 #footer-col2.widget-area').addClass("one_third"); 65jQuery('#footer-core.option16 #footer-col3.widget-area').addClass("one_sixth"); 66 67// Footer - Footer Widgets Layout (Option 17) 68jQuery('#footer-core.option17 #footer-col1.widget-area').addClass("one_fourth"); 69jQuery('#footer-core.option17 #footer-col2.widget-area').addClass("one_fourth"); 70jQuery('#footer-core.option17 #footer-col3.widget-area').addClass("one_sixth"); 71jQuery('#footer-core.option17 #footer-col4.widget-area').addClass("one_sixth"); 72jQuery('#footer-core.option17 #footer-col5.widget-area').addClass("one_sixth"); 73 74// Footer - Footer Widgets Layout (Option 18) 75jQuery('#footer-core.option18 #footer-col1.widget-area').addClass("one_sixth"); 76jQuery('#footer-core.option18 #footer-col2.widget-area').addClass("one_sixth"); 77jQuery('#footer-core.option18 #footer-col3.widget-area').addClass("one_sixth"); 78jQuery('#footer-core.option18 #footer-col4.widget-area').addClass("one_fourth"); 79jQuery('#footer-core.option18 #footer-col5.widget-area').addClass("one_fourth"); 80}); 81 82 83/* ---------------------------------------------------------------------------------- 84 FORMAT MAIN HEADER MENU 85---------------------------------------------------------------------------------- */ 86 87function mainmenu(){ 88 89 // Add menu-hover class 90 jQuery("header .header-links ul.menu > li").hover(function(){ 91 jQuery(this).find('ul.sub-menu:first').parent().addClass('menu-hover'); 92 },function(){ 93 jQuery(this).find('ul.sub-menu:first').parent().removeClass('menu-hover'); 94 }); 95 96 // Add menu-parent class 97 jQuery("header .header-links ul.menu > li").each(function(){ 98 jQuery(this).find('ul.sub-menu').parent().addClass('menu-parent'); 99 }); 100 101 // Correct menu for below header when navigating down page. 102 if( jQuery( 'body' ).hasClass( 'header-below' ) ) { 103 jQuery('#header').waypoint(function(direction) { 104 if (direction === 'down') { 105 jQuery( 'body' ).addClass( 'header-below2' ); 106 jQuery( 'body' ).removeClass( 'header-below1' ); 107 } 108 else { 109 jQuery( 'body' ).removeClass( 'header-below2' ); 110 jQuery( 'body' ).addClass( 'header-below1' ); 111 } 112 }, { 113 offset: '50%' 114 }); 115 } 116} 117jQuery(document).ready(function(){ 118 mainmenu(); 119}); 120 121 122// ---------------------------------------------------------------------------------- 123// RESPONSIVE MENU - TOGGLE DROPDOWN 124// ---------------------------------------------------------------------------------- 125 126jQuery(document).ready(function (){ 127 128 // Assign selector variables 129 const headernav_btn = jQuery('#header-responsive .btn-navbar'); 130 const header_responsive_inner = jQuery('#header-responsive-inner'); 131 const header_responsive_links = jQuery('#header-responsive .responsive-links'); 132 133console.log( 'headernav_btn - 1' ); 134console.log( headernav_btn ); 135console.log( header_responsive_inner ); 136console.log( header_responsive_links ); 137 138 // Open menu 139 headernav_btn.click(function(e){
140console.log( 'RESPONSIVE MENU - 1' ); 141 header_responsive_links.toggleClass( 'nav-open' ); 142 }); 143 144 // Close menu when exiting using keyboard tab 145 header_responsive_inner.on('focusout', function (e) { 146console.log( 'RESPONSIVE MENU - 2' ); 147 148 // Get tabbed element 149 const next = e.relatedTarget; 150 151console.log( 'RESPONSIVE MENU - 3' ); 152 153 // Exit if invalid element 154 if( !next ) return; 155 156console.log( 'RESPONSIVE MENU - 4' ); 157 158 // Do not close if tabbing back to toggle 159 if( headernav_btn.is(next) ) return; 160 161console.log( 'RESPONSIVE MENU - 5' ); 162 163 // Close menu if tabbing out to main content area 164 if( ! header_responsive_inner.has(next).length ) { 165console.log( 'RESPONSIVE MENU - 7' ); 166 headernav_btn.click(); 167 } 168 }); 169}); 170 171 172// ---------------------------------------------------------------------------------- 173// RESPONSIVE MENU - TOGGLE SUB MENUS 174// ---------------------------------------------------------------------------------- 175 176jQuery(document).ready(function (){ 177 178 jQuery( '#header-responsive .menu-item-has-children > a' ).after( '<span class="sub-menu-toggle" tabindex="0"></span>' ); 179 180 jQuery( '#header-responsive .menu-item-has-children .sub-menu-toggle' ).click(function(e){ 181 182 var parentmenu = jQuery( this ).closest('.menu-item-has-children'); 183 184 if( parentmenu.hasClass( 'sub-menu-show' ) ) { 185 jQuery( parentmenu ).removeClass('sub-menu-show'); 186 } else { 187 jQuery( parentmenu ).addClass('sub-menu-show'); 188 } 189 190 }); 191 192 // Open navigation menu on enter when focused 193 jQuery( '#header-responsive .btn-navbar, #header-responsive .menu-item-has-children .sub-menu-toggle' ).keyup(function(e){ 194 195 // User has pressed space 196 if( e.keyCode == 13 ) { 197 198 // Trigger click event 199 jQuery( this ).trigger( 'click' ); 200 201 // Add aria-expanded attribute 202 var valueAriaExpanded = jQuery( '#header-responsive-inner' ).attr( 'aria-expanded' ); 203 204 if( ! valueAriaExpanded || valueAriaExpanded == 'false' ) { 205 jQuery( '#header-responsive-inner' ).attr( 'aria-expanded', 'true' ) 206 } else { 207 jQuery( '#header-responsive-inner' ).attr( 'aria-expanded', 'false' ) 208 } 209 } 210 }); 211}); 212 213 214/* ---------------------------------------------------------------------------------- 215 STICKY HEADER 216---------------------------------------------------------------------------------- */ 217jQuery(window).load(function(){ 218 219 // Trigger sticky header on devices wider than 768px 220 if ( jQuery(window).width() > 768 && jQuery( 'body' ).hasClass( 'header-sticky' ) || 221 jQuery( 'body' ).hasClass( 'header-sticky' ) && jQuery( 'body' ).hasClass( 'layout-fixed' ) ) { 222 223 if(jQuery( 'body' ).hasClass( 'header-style1' )) { 224 // Offset #header for smooth sticky effect 225 headerTop = jQuery( '#pre-header' ).height(); 226 jQuery( '#header' ).animate({'top': headerTop },300 ); 227 228 // Move slide content down by height of #pre-header on home pages 229 if( jQuery( 'body' ).hasClass( 'home' )) { 230 231 // Move slide content down by height of #pre-header on home pages 232 if( jQuery( 'body' ).hasClass( 'slider-boxed' )) { 233 jQuery( '#slider-core' ).animate({'margin-top': headerTop },300 ); 234 } 235 } 236 237 // Add margin to site header so content doesn't get hidden behind header 238 if( ! jQuery( 'body' ).hasClass( 'home' ) && jQuery( '#wpadminbar' ).length == '0' ) { 239 jQuery( '#site-header' ).animate({'margin-bottom': headerTop },300 ); 240 } 241 242 // Trigger sticky on #header 243 if ( ! jQuery( '#header' ).parent().hasClass( 'sticky-done' ) ) { 244 jQuery( '#header' ).sticky( { topSpacing:0 } ); 245 jQuery( '#header-sticky-wrapper' ).addClass( 'sticky-done' ); 246 } 247 248 // Reposition #header smoothly when top of page is reached 249 jQuery(window).scroll(function(){ 250 if(!jQuery(window).scrollTop()) { 251 headerTop = jQuery( '#pre-header' ).height(); 252 jQuery( '#header' ).animate({'top': headerTop },300 ); 253 } 254 }); 255 256 257 } else if(jQuery( 'body' ).hasClass( 'header-style2' )) { 258 jQuery("#header-links").sticky({topSpacing:0}); 259 } 260 } 261}); 262 263 264/* ---------------------------------------------------------------------------------- 265 FLUID MEDIA SIZES (Modified from http://bavotasan.com/2012/better-way-to-resize-video-using-jquery) 266---------------------------------------------------------------------------------- */ 267 268/* Videos */ 269jQuery(document).ready(function() { 270
271 /* Supported Platforms */ 272 var all_videos = jQuery( 'iframe[src*="//player.vimeo.com"], iframe[src*="//www.youtube.com"], iframe[src*="//blip.tv"], iframe[src*="//www.slideshare.net"], iframe[src*="//www.scribd.com"], iframe[src*="//revision3.com"], iframe[src*="//www.hulu.com"], iframe[src*="//www.funnyordie.com"], iframe[src*="//www.dailymotion.com"], iframe[src*="//maps.google.com"], embed[src*="//v.wordpress.com"], object, embed' ); 273 274 all_videos.each(function() { 275 var el = jQuery(this); 276 el 277 .attr( 'data-aspectRatio', 360 / 640 ) 278 .attr( 'data-oldWidth', el.width() ); 279 } ); 280 281 jQuery(document).ready(function() { 282 all_videos.each( function() { 283 var el = jQuery(this), 284 newWidth = el.parents().width(), 285 oldWidth = el.attr( 'data-oldWidth' ); 286 ratioHeight = el.height() / el.outerHeight(), 287 288 el 289 .removeAttr( 'height' ) 290 .removeAttr( 'width' ) 291 .width( newWidth * ratioHeight ) 292 .outerHeight( newWidth * el.attr( 'data-aspectRatio' ) ); 293 }); 294 }).resize(); 295 296 jQuery(window) 297 .resize( function() { 298 all_videos.each( function() { 299 var el = jQuery(this), 300 newWidth = el.parents().width(), 301 oldWidth = el.attr( 'data-oldWidth' ); 302 ratioHeight = el.height() / el.outerHeight(), 303 304 el 305 .removeAttr( 'height' ) 306 .removeAttr( 'width' ) 307 .width( newWidth * ratioHeight ) 308 .outerHeight( newWidth * el.attr( 'data-aspectRatio' ) ); 309 }); 310 }).resize(); 311}); 312 313/* SoundCloud */ 314jQuery(document).ready(function() { 315 316 /* Supported Platforms */ 317 var all_sounds = jQuery( 'iframe[src^="http://w.soundcloud.com"]' ); 318 319 all_sounds.each(function() { 320 var el = jQuery(this); 321 el 322 .attr( 'data-aspectRatio', el.attr( 'height' ) / el.attr( 'width' ) ) 323 .attr( 'data-oldWidth', el.width() ); 324 }); 325 326 jQuery(document).ready(function() { 327 all_sounds.each( function() { 328 var el = jQuery(this), 329 newWidth = el.parents().width(), 330 oldWidth = el.attr( 'data-oldWidth' ); 331 332 el 333 .removeAttr( 'width' ) 334 .width( newWidth ) 335 }); 336 }).resize(); 337 338 jQuery(window) 339 .resize( function() { 340 all_sounds.each( function() { 341 var el = jQuery(this), 342 newWidth = el.parents().width(), 343 oldWidth = el.attr( 'data-oldWidth' ); 344 345 el 346 .removeAttr( 'width' ) 347 .width( newWidth ) 348 }); 349 }).resize(); 350}); 351 352 353/* ---------------------------------------------------------------------------------- 354 ADD PRETTYPHOTO TO PORTFOLIO PAGE 355---------------------------------------------------------------------------------- */ 356 357jQuery(document).ready(function() { 358 jQuery('#container.portfolio-wrapper a').has('img.hover-zoom').addClass('prettyPhoto'); 359 jQuery('#container.portfolio-wrapper a').has('img.hover-zoom').attr('rel','portfolio[gallery]'); 360 jQuery('a.prettyPhoto').has('img').attr('rel','portfolio[gallery]'); 361 jQuery('a.prettyPhoto').prettyPhoto(); 362}); 363 364 365 366/* ---------------------------------------------------------------------------------- 367 ADD PRETTYPHOTO TO POST IMAGE PAGE 368---------------------------------------------------------------------------------- */ 369 370jQuery(document).ready(function() { 371 jQuery('body.attachment .entry-attachment .attachment a').has('img').addClass('prettyPhoto'); 372 jQuery('a.prettyPhoto').prettyPhoto(); 373}); 374 375 376/* ---------------------------------------------------------------------------------- 377 MASONRY - LOAD AFTER IMAGES HAVE LOADED 378---------------------------------------------------------------------------------- */ 379 380jQuery(document).ready(function() { 381 382 // Call imagedLoaded for Masonry if imagedLoaded function is available 383 (function ( $ ) { 384 if ( $.isFunction($.fn.imagesLoaded) ) { 385 386 // Different target for masonry on portfolio pages than any other page 387 if ( $( '#container' ).hasClass( 'portfolio-wrapper' ) ) { 388 var $container = $('#container-inner'); 389 } else if ( $( 'body' ).hasClass( 'woo-shop-grid' ) ) { 390 var $container = $('#main-core .products'); 391 } else { 392 var $container = $('#container'); 393 } 394 395 $container.imagesLoaded( function() { 396 if ( $.isFunction($.fn.masonry) ) { 397 $container.masonry(); 398 } 399 }); 400 } 401 }( jQuery ));
402}); 403 404 405/* ---------------------------------------------------------------------------------- 406 WIDGETS 407---------------------------------------------------------------------------------- */ 408 409/* Categories */ 410jQuery(document).ready(function(){ 411 jQuery('.widget.thinkup_widget_categories .cat-item a').prepend('<i class="icon-caret-right icon-large"></i>'); 412}); 413 414 415/* ---------------------------------------------------------------------------------- 416 ADD _BLANK TO OUTGOING LINKS 417---------------------------------------------------------------------------------- */ 418 419jQuery(document).ready(function(){ 420 jQuery('.thinkup_widget_flickr a[href^="http://"], .thinkup_widget_flickr a[href^="https://"]').attr('target','_blank'); 421 jQuery('.thinkup_widget_socialshare a[href^="http://"], .thinkup_widget_socialshare a[href^="https://"]').attr('target','_blank'); 422 jQuery('.thinkup_widget_socialprofiles a[href^="http://"], .thinkup_widget_socialprofiles a[href^="https://"]').attr('target','_blank'); 423 jQuery('#pre-header-social a[href^="http://"], #pre-header-social a[href^="https://"]').attr('target','_blank'); 424 jQuery('#shareicons a[href^="http://"], #shareicons a[href^="https://"]').attr('target','_blank'); 425}); 426 427 428/* ---------------------------------------------------------------------------------- 429 SHORTCODES 430---------------------------------------------------------------------------------- */ 431 432jQuery(document).ready(function() { 433 434 /* Accordion - Fix Bootstrap Toggle Issue */ 435 jQuery('.accordion-toggle').click(function() { 436 if(jQuery(this).hasClass('collapsed')) { 437 jQuery(this).closest('.accordion').find('.accordion-toggle').not(this).addClass('collapsed'); 438 } 439 }); 440 441 /* Divider - Scroll To Top */ 442 jQuery('.backtotop').click(function(){ 443 jQuery('html, body').animate({scrollTop:0}, 'slow'); 444 }); 445 446 /* Lightbox - Add Image Overlay*/ 447 jQuery('.lightbox').after('<span class="lightbox-overlay"></span>'); 448 449 /* Tooltip - Activate Bootstrap */ 450 jQuery('[data-tip]').each( function() {jQuery(this).tooltip({ placement: jQuery(this).data('tip') }); }); 451 452 /* Blog Post - Carousel (used for identifying if input variable is an integer */ 453 function isNumber(n) { 454 return !isNaN(parseFloat(n)) && isFinite(n); 455 } 456 457 /* Blog Post - Activate CarouFredSel */ 458 jQuery(window).bind( 'load resize', function() { 459 jQuery( '.sc-carousel' ).each( function(i) { 460 461 // Don't run caroufredsel code if the following classes are present. 462 if ( jQuery( this ).hasClass( 'sc-postitem' ) || 463 jQuery( this ).hasClass( 'sc-featured' ) || 464 jQuery( this ).hasClass( 'sc-image' ) ) { 465 return; 466 }; 467 468 var instanceID = 'sc-carousel-' + i; 469 470 jQuery( this ).attr( 'id', instanceID ); 471 472 jQuery( this ).children( 'ul').attr( 'id', instanceID + '-inner' ); 473 474 var show = jQuery( '#' + instanceID + '.sc-carousel' ).data( 'show' ); 475 var scroll = jQuery( '#' + instanceID + '.sc-carousel' ).data( 'scroll' ); 476 var speed = jQuery( '#' + instanceID + '.sc-carousel' ).data( 'speed' ); 477 var effect = jQuery( '#' + instanceID + '.sc-carousel' ).data( 'effect' ); 478 479 if ( show == 0 || isNaN( show ) == true ) show = '3'; 480 if ( scroll == 0 || isNaN( scroll ) == true ) scroll = '1'; 481 if ( speed == 0 ) speed = '500'; 482 if ( effect == 0 ) { 483 effect = '"scroll"'; 484 } else { 485 effect = '"' + effect + '"'; 486 } 487 488 var showItems = show; 489 var scrollItems = scroll; 490 var speedItems = speed; 491 var fxItems = effect; 492 493 var width = jQuery(window).width(); 494 495 if ( jQuery( 'body' ).hasClass( 'layout-responsive' ) ) { 496 if(width <=685) { 497 showItems = 2; 498 if( scrollItems >= 2 ) { 499 scrollItems = 2; 500 } 501 } 502 if(width <=480) { 503 showItems = 1; 504 scrollItems = 1; 505 } 506 } 507 508 // Apply carousel code if needed 509 if ( jQuery( this ).find( '#' + instanceID + '-inner' ).length ) { 510 511 jQuery( this ).find( '#' + instanceID + '-inner' ).carouFredSel({ 512 width: '100%', 513 items : { 514 visible : showItems, 515 minimum : 3, 516 minimum : 3, 517 start: 0 518 }, 519 scroll : { 520 items : scrollItems, 521 fx : fxItems, 522 easing : "swing", 523 duration : speedItems, 524 }, 525 responsive : true, 526 circular : true, 527 infinite : false, 528 auto : false, 529 prev : { 530 button : '#' + instanceID + ' .prev', 531 key : 'left' 532 }, 533 next : { 534 button : '#' + instanceID + ' .next', 535 key : 'right' 536 }, 537 pagination : '#' + instanceID + ' .pagination', 538 onCreate: function () { 539 jQuery(window).bind("load resize", function() { 540 541 // Set height to testimonial carousel elements - All 542 parentWidthTestimonial = jQuery( '#' + instanceID + '.carousel-testimonial li').outerHeight(); 543 jQuery( '#' + instanceID + '.carousel-testimonial' ).height( 'auto' ); 544 jQuery( '#' + instanceID + '.carousel-testimonial .caroufredsel_wrapper' ).css( { 'height': parentWidthTestimonial } ); 545 546 // Set height to testimonial carousel elements - Fix Style 1 547 parentWidthTestimonial_1 = jQuery( '#' + instanceID + '.carousel-testimonial.style1 .caroufredsel_wrapper').outerHeight(); 548 parentWidthTestimonial_2 = jQuery( '#' + instanceID + '.carousel-testimonial.style1 .sc-carousel-thumbs').outerHeight(); 549 550 jQuery( '#' + instanceID + '.carousel-testimonial.style1' ).height( parentWidthTestimonial_1 + parentWidthTestimonial_2 ); 551 jQuery( '#' + instanceID + '.carousel-testimonial.style1 .sc-carousel-thumbs' ).parent().height( parentWidthTestimonial_2 ); 552 });
553 } 554 }); 555 } 556 557 // Used for adding thumbnails to slider - Currently only for Testimonials slider 558 if ( jQuery( this ).find('.sc-carousel-thumbs').length ) { 559 560 jQuery( this ).find('.sc-carousel-thumbs').carouFredSel({ 561 responsive: true, 562 circular: false, 563 infinite: false, 564 auto: false, 565 prev: '#prev', 566 next: '#next', 567 items: { 568 visible: { 569 min: 2, 570 max: 6 571 }, 572 width: 150, 573 height: 70 574 } 575 }); 576 } 577 578 jQuery( this ).find('.sc-carousel-thumbs a').click(function() { 579 jQuery('#' + instanceID + '-inner').trigger('slideTo', '#' + this.href.split('#').pop() ); 580 jQuery('.sc-carousel-thumbs a').removeClass('selected'); 581 jQuery( this ).addClass('selected'); 582 return false; 583 }); 584 585 // Set carousel container height 586 parentHeight = jQuery( '#' + instanceID + ' li').height(); 587 jQuery( '#' + instanceID + ' li' ).each(function() { 588 var elementHeight = jQuery(this).height(); 589 parentHeight = elementHeight > parentHeight ? elementHeight : parentHeight; 590 }); 591 592 // Add addition height if carousel thumbnails are showing 593 if( jQuery( '#' + instanceID ).closest('.sc-carousel').find('.sc-carousel-thumbs').length > 0 ) { 594 parentHeightThumb = parentHeight + jQuery( '#' + instanceID ).closest('.sc-carousel').find('.sc-carousel-thumbs').height(); 595 } else { 596 parentHeightThumb = parentHeight; 597 } 598 599 // Assign height to unique carousel ID (Max used to ensure thumbnail carousel displays correctly) 600 jQuery( '#' + instanceID ).height( Math.max( parentHeight, parentHeightThumb ) ); 601 jQuery( '#' + instanceID + '-inner' ).height( parentHeight ); 602 jQuery( '#' + instanceID + '-inner' ).parent().height( parentHeight ); 603 604 // Set carousel container height to auto if iframe exists in featured images 605 if ( jQuery( '#' + instanceID + ' iframe').length > 0 ) { 606 jQuery( '#' + instanceID ).addClass('carousel-iframe'); 607 } 608 }); 609 610 }).resize(); 611 612 /* Make slider full width if specified */ 613 jQuery( '.rslides-sc' ).each(function( index, element ){ 614 615 jQuery( element ).attr( 'id', 'thinkupbuilder-sliderimage-' + index ); 616 617 // Collect slider parameter values 618 var wide = jQuery( element ).data( 'wide' ); 619 620 // Format row section for full-screen slider 621 if ( wide == 'on' ) { 622 jQuery( element ).closest( '.panel-grid' ).css( 'padding', 0 ); 623 jQuery( element ).closest( '.panel-grid-core' ).css( 'margin', 0 ).css( 'maxWidth', '100%' ); 624 jQuery( element ).closest( '.panel-grid-cell' ).css( 'padding', 0 ); 625 } 626 }); 627 628 /* Make ThinkUpSlider shortcode full width if specified */ 629 jQuery( '.thinkupslider-sc' ).each(function( index, element ){ 630 631 jQuery( element ).attr( 'id', 'thinkupbuilder-thinkupsliderimage-' + index ); 632 633 // Collect slider parameter values 634 var wide = jQuery( element ).data( 'wide' ); 635 636 // Format row section for full-screen slider 637 if ( wide == 'on' ) { 638 jQuery( element ).closest( '.panel-grid' ).css( 'padding', 0 ); 639 jQuery( element ).closest( '.panel-grid-core' ).css( 'margin', 0 ).css( 'maxWidth', '100%' ); 640 jQuery( element ).closest( '.panel-grid-cell' ).css( 'padding', 0 ); 641 } 642 }); 643}); 644
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.