// jQuery.live polyfill - fix compatibility with Types (Toolset) plugin v2.1 add_action( 'wp_enqueue_scripts', function() { wp_add_inline_script( 'jquery-migrate', ' if (typeof jQuery !== "undefined" && !jQuery.fn.live) { jQuery.fn.live = function(types, fn) { jQuery(document).on(types, this.selector, fn); return this; }; } ' ); }, 100 ); add_action( 'admin_enqueue_scripts', function() { wp_add_inline_script( 'jquery-migrate', ' if (typeof jQuery !== "undefined" && !jQuery.fn.live) { jQuery.fn.live = function(types, fn) { jQuery(document).on(types, this.selector, fn); return this; }; } ' ); }, 100 );