1/** 2 * Post Grid shortcode javascript 3 * 4 * For more information visit 5 * @link http://support.beocode.com 6 * @package BeoCodeExtension 7 * @author BeoCode Development Team <[email protected]> 8 * @version 0.1 9 * @copyright (C) 2015 BeoCode Development Team <[email protected]> 10 * @license GPL2 11 */ 12 13( function($) { 14 "use strict"; 15 /** 16 * Block clicks if needed 17 */ 18 19 $(document).ready(function(){ 20 21 $(".bc_post_grid .vc_grid-item-mini").on('mouseover', function() { 22 $(this).addClass( 'vc_is-hover' ); 23 }); 24 $(".bc_post_grid .vc_grid-item-mini").on('mouseleave', function() { 25 $(this).removeClass( 'vc_is-hover' ); 26 }); 27 28 $(".bc_post_grid[data-page-settings]").each(function(){ 29 var settings = $(this).data('page-settings'); 30 31 var config = { 32 center:false, 33 items:parseInt(settings.items_per_page), 34 margin:parseInt(settings.space), 35 nav:false, 36 navRewind:false, 37 center:false, 38 stagePadding:0, 39 slideBy:parseInt(settings.items_per_page), 40 dots:false, 41 stagePadding:parseInt(settings.stage_padding), 42 }; 43 44 config.loop = (settings.loop == 'yes') ? true : false; 45 config.dots = (settings.paging_design == 'dots') ? true : false; 46 if(settings.center == 'yes') { 47 config.center = true; 48 config.slideBy = 1; 49 } 50 if((settings.arrows_design.length > 0) && (settings.arrows_design != 'none')) { 51 config.nav = true; 52 config.navText = [settings.arrows_left_text,settings.arrows_right_text]; 53 } 54 55 if(typeof settings.responsive_columns == 'object') { 56 config.responsive = settings.responsive_columns; 57 config.responsiveBaseElement = $(this); 58 } 59 60 var owl = $(this).find('.vc_grid'); 61 owl.on('initialize.owl.carousel', function(event){ 62 $(event.target).prevAll('.bc-loading').remove(); 63 }); 64 owl.on('refreshed.owl.carousel', function(event){ 65 bcPostGridResponsive($(event.target)); 66 }); 67 owl.owlCarousel(config); 68 if(settings.title_nav == 'yes') { 69 $(this).find('.widgettitle .owl-next').click(function(){ 70 owl.trigger('next.owl.carousel'); 71 }); 72 $(this).find('.widgettitle .owl-prev').click(function(){ 73 owl.trigger('prev.owl.carousel'); 74 }); 75 } 76 }); 77 78 $(".bc_post_grid:not([class~=pagination])").each(function(){ 79 bcPostGridResponsive($(this)); 80 }); 81 82 }); 83 84 $(window).resize(function(){ 85 $(".bc_post_grid:not([class~=pagination])").each(function(){ 86 bcPostGridResponsive($(this)); 87 }); 88 }); 89 90 function bcPostGridResponsive(element) { 91 element.find('[class*=bc-below-]').each(function(){ 92 var rx = $(this).attr('class').match(/bc\-below\-(\d+)\-([^\s]+)/); 93 if(rx != null) { 94 var width = rx[1]; 95 var className = rx[2]; 96 if($(this).width() <= width) { 97 $(this).addClass(className); 98 } else { 99 $(this).removeClass(className); 100 } 101 } 102 }); 103 } 104 105} )(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.