replace jQuery.bind except in 3rd party assets
This commit is contained in:
parent
34bd50bce3
commit
9b7b72f00a
|
@ -346,7 +346,7 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
postForm.on( 'submit', this.save_on_submit );
|
postForm.on( 'submit', this.save_on_submit );
|
||||||
|
|
||||||
$( 'input:submit', postForm ).bind( 'click keypress', function() {
|
$( 'input:submit', postForm ).on( 'click keypress', function() {
|
||||||
postForm.data( 'callerid', this.id );
|
postForm.data( 'callerid', this.id );
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@ jQuery( function( $ ) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Prevent enter submitting post form.
|
// Prevent enter submitting post form.
|
||||||
$( '#upsell_product_data' ).bind( 'keypress', function( e ) {
|
$( '#upsell_product_data' ).on( 'keypress', function( e ) {
|
||||||
if ( e.keyCode === 13 ) {
|
if ( e.keyCode === 13 ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ jQuery(function( $ ) {
|
||||||
var prev_data_index = null;
|
var prev_data_index = null;
|
||||||
var prev_series_index = null;
|
var prev_series_index = null;
|
||||||
|
|
||||||
$( '.chart-placeholder' ).bind( 'plothover', function ( event, pos, item ) {
|
$( '.chart-placeholder' ).on( 'plothover', function ( event, pos, item ) {
|
||||||
if ( item ) {
|
if ( item ) {
|
||||||
if ( prev_data_index !== item.dataIndex || prev_series_index !== item.seriesIndex ) {
|
if ( prev_data_index !== item.dataIndex || prev_series_index !== item.seriesIndex ) {
|
||||||
prev_data_index = item.dataIndex;
|
prev_data_index = item.dataIndex;
|
||||||
|
|
|
@ -250,7 +250,7 @@
|
||||||
var shifted = false;
|
var shifted = false;
|
||||||
var hasFocus = false;
|
var hasFocus = false;
|
||||||
|
|
||||||
$( document.body ).bind( 'keyup keydown', function( e ) {
|
$( document.body ).on( 'keyup keydown', function( e ) {
|
||||||
shifted = e.shiftKey;
|
shifted = e.shiftKey;
|
||||||
controlled = e.ctrlKey || e.metaKey;
|
controlled = e.ctrlKey || e.metaKey;
|
||||||
});
|
});
|
||||||
|
|
|
@ -32,7 +32,7 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
// Handle locale
|
// Handle locale
|
||||||
$( document.body )
|
$( document.body )
|
||||||
.bind( 'country_to_state_changing', function( event, country, wrapper ) {
|
.on( 'country_to_state_changing', function( event, country, wrapper ) {
|
||||||
var thisform = wrapper, thislocale;
|
var thisform = wrapper, thislocale;
|
||||||
|
|
||||||
if ( typeof locale[ country ] !== 'undefined' ) {
|
if ( typeof locale[ country ] !== 'undefined' ) {
|
||||||
|
|
|
@ -180,7 +180,7 @@ jQuery( function( $ ) {
|
||||||
wp.customize.widgetsPreview.WidgetPartial
|
wp.customize.widgetsPreview.WidgetPartial
|
||||||
);
|
);
|
||||||
if ( hasSelectiveRefresh ) {
|
if ( hasSelectiveRefresh ) {
|
||||||
wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function() {
|
wp.customize.selectiveRefresh.on( 'partial-content-rendered', function() {
|
||||||
refresh_cart_fragment();
|
refresh_cart_fragment();
|
||||||
} );
|
} );
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,8 +16,8 @@ jQuery( function( $ ) {
|
||||||
$order_review: $( '#order_review' ),
|
$order_review: $( '#order_review' ),
|
||||||
$checkout_form: $( 'form.checkout' ),
|
$checkout_form: $( 'form.checkout' ),
|
||||||
init: function() {
|
init: function() {
|
||||||
$( document.body ).bind( 'update_checkout', this.update_checkout );
|
$( document.body ).on( 'update_checkout', this.update_checkout );
|
||||||
$( document.body ).bind( 'init_checkout', this.init_checkout );
|
$( document.body ).on( 'init_checkout', this.init_checkout );
|
||||||
|
|
||||||
// Payment methods
|
// Payment methods
|
||||||
this.$checkout_form.on( 'click', 'input[name="payment_method"]', this.payment_method_selected );
|
this.$checkout_form.on( 'click', 'input[name="payment_method"]', this.payment_method_selected );
|
||||||
|
|
|
@ -70,7 +70,7 @@ jQuery( function( $ ) {
|
||||||
|
|
||||||
wc_country_select_select2();
|
wc_country_select_select2();
|
||||||
|
|
||||||
$( document.body ).bind( 'country_to_state_changed', function() {
|
$( document.body ).on( 'country_to_state_changed', function() {
|
||||||
wc_country_select_select2();
|
wc_country_select_select2();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue