jQuery(document).ready(function($) { $('.module-3-tabs').on('click', 'label', function(){ $('.active-tab').removeClass('active-tab'); $(this).addClass('active-tab'); }); $('.module-3-container').on('click', '.action-button', function(){ var id = $(this).parents('.module-3-container').find('.active-tab').attr('data-tab'); $(this).parents('.module-3-container').find('.module-3-content-wrapper').addClass('active-popup'); $('.active-tab-content').removeClass('active-tab-content'); $(this).parents('.module-3-container').find('#'+id).addClass('active-tab-content'); }); $('.module-3-content-wrapper').on('click', 'button', function(){ $('.active-popup').removeClass('active-popup'); }); $('.module-7-header').on('click', 'h5', function(){ var holder = $(this).parents('.module-7-inside'); holder.toggleClass('module-7-open'); return holder.hasClass('module-7-open') ? holder.find('.module-7-content').css('max-height',holder.find('.module-7-content').get(0).scrollHeight + 'px') : holder.find('.module-7-content').css('max-height','0px'); }); function module_9_fix_height_top() { var top_1 = $('.module-9-inside-top.1').get(0).scrollHeight; var top_2 = $('.module-9-inside-top.2').get(0).scrollHeight; if($('.module-9-container').length) { if(top_1 > top_2) { $('.module-9-inside-top.2').css('min-height', top_1 + 'px'); } else if( top_1 < top_2 ) { $('.module-9-inside-top.1').css('min-height', top_2 + 'px'); } else { return; } } } function module_9_fix_height_bottom() { var bottom_1 = $('.module-9-inside-bottom.1').get(0).scrollHeight; var bottom_2 = $('.module-9-inside-bottom.2').get(0).scrollHeight; if($('.module-9-container').length) { if(bottom_1 > bottom_2) { $('.module-9-inside-bottom.2').css('min-height', bottom_1 + 'px'); } else if( bottom_1 < bottom_2 ) { $('.module-9-inside-bottom.1').css('min-height', bottom_2 + 'px'); } else { return; } } } if($('.module-9-container').length) { module_9_fix_height_top(); module_9_fix_height_bottom(); } });