PATH:
home
/
letacommog
/
entrepro
/
wp-content
/
plugins
/
dokan-pro
/
assets
/
src
/
js
// Shipping tab js (function($){ $(document).ready(function(){ $('.dokan-shipping-location-wrapper').on('change', '.dps_country_selection', function() { var self = $(this), data = { country_id : self.find(':selected').val(), action : 'dps_select_state_by_country' }; if ( self.val() == '' || self.val() == 'everywhere' ) { self.closest('.dps-shipping-location-content').find('table.dps-shipping-states tbody').html(''); } else { $.post( dokan.ajaxurl, data, function(response) { if( response.success ) { self.closest('.dps-shipping-location-content').find('table.dps-shipping-states tbody').html(response.data); } }); } }); $('.dps-main-wrapper').on('click', 'a.dps-shipping-add', function(e) { e.preventDefault(); html = $('#dps-shipping-hidden-lcoation-content'); var row = $(html).first().clone().appendTo($('.dokan-shipping-location-wrapper')).show(); $('.dokan-shipping-location-wrapper').find('.dps-shipping-location-content').first().find('a.dps-shipping-remove').show(); $('.tips').tooltip(); row.removeAttr('id'); row.find('input,select').val(''); row.find('a.dps-shipping-remove').show(); }); $('.dokan-shipping-location-wrapper').on('click', 'a.dps-shipping-remove', function(e) { e.preventDefault(); $(this).closest('.dps-shipping-location-content').remove(); $dpsElm = $('.dokan-shipping-location-wrapper').find('.dps-shipping-location-content'); if( $dpsElm.length == 1) { $dpsElm.first().find('a.dps-shipping-remove').hide(); } }); $('.dokan-shipping-location-wrapper').on('click', 'a.dps-add', function(e) { e.preventDefault(); var row = $(this).closest('tr').first().clone().appendTo($(this).closest('table.dps-shipping-states')); row.find('input,select').val(''); row.find('a.dps-remove').show(); $('.tips').tooltip(); }); $('.dokan-shipping-location-wrapper').on('click', 'a.dps-remove', function(e) { e.preventDefault(); if( $(this).closest('table.dps-shipping-states').find( 'tr' ).length == 1 ){ $(this).closest('.dps-shipping-location-content').find('td.dps_shipping_location_cost').show(); } $(this).closest('tr').remove(); }); $('.dokan-shipping-location-wrapper').on('change keyup', '.dps_state_selection', function() { var self = $(this); if( self.val() == '' || self.val() == '-1' ) { self.closest('.dps-shipping-location-content').find('td.dps_shipping_location_cost').show(); } else { self.closest('.dps-shipping-location-content').find('td.dps_shipping_location_cost').hide(); } }); $('.dokan-shipping-location-wrapper .dps_state_selection').trigger('change'); $('.dokan-shipping-location-wrapper .dps_state_selection').trigger('keyup'); $wrap = $('.dokan-shipping-location-wrapper').find('.dps-shipping-location-content'); if( $wrap.length == 1) { $wrap.first().find('a.dps-shipping-remove').hide(); } }); })(jQuery);
[+]
..
[-] shipping.js
[edit]
[-] product.js
[edit]
[-] admin.js
[edit]
[-] announcement.js
[edit]
[-] product-variation.js
[edit]
[-] store-seo.js
[edit]
[-] reviews.min.js
[edit]
[-] inline-editable-table.js
[edit]
[-] reviews.js
[edit]
[-] coupon.js
[edit]