Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
wp-content
/
plugins
/
yith-woocommerce-compare
/
plugin-fw
/
assets
/
js
:
yith-bh-onboarding.js
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
(function($) { var init = function() { $('#yith-bh-onboarding').fadeIn(); var currentTab = $('.yith-bh-onboarding-tabs__nav li.selected').data('tab'); $('#' + currentTab).fadeIn(); }; var block = function(element) { var blockArgs = { message: '', overlayCSS: { backgroundColor: '#FFFFFF', opacity: 0.8, cursor: 'wait', }, }; element.block(blockArgs); }; var unblock = function(element) { element.unblock(); }; $(document).on('click', '.yith-bh-onboarding-tabs__nav li', function(e) { var $t = $(this); //nav $('.yith-bh-onboarding-tabs__nav li').removeClass('selected'); $t.addClass('selected'); //tab content $('.yith-bh-onboarding-tabs__tab').hide(); $('#' + $t.data('tab')).fadeIn(); }); $(document).on('submit', 'form', function(e) { e.preventDefault(); var form = $(this); if (true === $(document).triggerHandler('yith_onboarding_form_submit_validation')) { $(document).trigger('yith_onboarding_validate_form_submit', [form]); return false; } block($('.yith-bh-onboarding-tabs__content')); $.ajax( { type: 'POST', data: form.serialize(), url: yith_bh_onboarding.ajax_url, success: function(response) { if (response.success) { var button = parent.document.querySelector( '.components-modal__frame button'); button.click(); } }, complete: function() { unblock($('.yith-bh-onboarding-tabs__content')); }, }, ); }); init(); })(jQuery);