Upload: improve legacy SWFUpload event handlers for current jQuery.
Fix an issue where legacy JavaScript for SWFUpload still used jQuery's deprecated `live` event which no longer works - switch to using `on`. This JavaScript is still used by some plugins and themes. Props MMDeveloper. Fixes #39886. git-svn-id: https://develop.svn.wordpress.org/trunk@40431 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a92edf9e9a
commit
0bdd57140b
|
@ -356,7 +356,7 @@ function cancelUpload() {
|
||||||
|
|
||||||
// remember the last used image size, alignment and url
|
// remember the last used image size, alignment and url
|
||||||
jQuery(document).ready(function($){
|
jQuery(document).ready(function($){
|
||||||
$('input[type="radio"]', '#media-items').live('click', function(){
|
$( 'input[type="radio"]', '#media-items' ).on( 'click', function(){
|
||||||
var tr = $(this).closest('tr');
|
var tr = $(this).closest('tr');
|
||||||
|
|
||||||
if ( $(tr).hasClass('align') )
|
if ( $(tr).hasClass('align') )
|
||||||
|
@ -365,7 +365,7 @@ jQuery(document).ready(function($){
|
||||||
setUserSetting('imgsize', $(this).val());
|
setUserSetting('imgsize', $(this).val());
|
||||||
});
|
});
|
||||||
|
|
||||||
$('button.button', '#media-items').live('click', function(){
|
$( 'button.button', '#media-items' ).on( 'click', function(){
|
||||||
var c = this.className || '';
|
var c = this.className || '';
|
||||||
c = c.match(/url([^ '"]+)/);
|
c = c.match(/url([^ '"]+)/);
|
||||||
if ( c && c[1] ) {
|
if ( c && c[1] ) {
|
||||||
|
|
Loading…
Reference in New Issue