File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -49,30 +49,30 @@ jQuery(document).ready(function ($) {
49
49
$ ( this ) . after ( '<div id="picker-' + i + '" style="z-index: 1000; background: #EEE; border: 1px solid #CCC; position: absolute; display: block;"></div>' ) ;
50
50
$ ( '#picker-' + i ) . hide ( ) . farbtastic ( $ ( this ) ) ;
51
51
} )
52
- . focus ( function ( ) {
52
+ . on ( 'focus' , function ( ) {
53
53
$ ( this ) . next ( ) . show ( ) ;
54
54
} )
55
- . blur ( function ( ) {
55
+ . on ( 'blur' , function ( ) {
56
56
$ ( this ) . next ( ) . hide ( ) ;
57
57
} ) ;
58
58
59
59
/**
60
60
* File and image upload handling
61
61
*/
62
- $ ( ' .cmb_upload_file') . change ( function ( ) {
62
+ $ ( document ) . on ( 'change' , ' .cmb_upload_file', function ( ) {
63
63
formfield = $ ( this ) . attr ( 'name' ) ;
64
64
$ ( '#' + formfield + '_id' ) . val ( "" ) ;
65
65
} ) ;
66
66
67
- $ ( '.cmb_upload_button' ) . live ( 'click' , function ( ) {
67
+ $ ( '.cmb_upload_button' ) . on ( 'click' , function ( ) {
68
68
var buttonLabel ;
69
69
formfield = $ ( this ) . prev ( 'input' ) . attr ( 'name' ) ;
70
70
buttonLabel = 'Use as ' + $ ( 'label[for=' + formfield + ']' ) . text ( ) ;
71
71
tb_show ( '' , 'media-upload.php?post_id=' + $ ( '#post_ID' ) . val ( ) + '&type=file&cmb_force_send=true&cmb_send_label=' + buttonLabel + '&TB_iframe=true' ) ;
72
72
return false ;
73
73
} ) ;
74
74
75
- $ ( '.cmb_remove_file_button' ) . live ( 'click' , function ( ) {
75
+ $ ( '.cmb_remove_file_button' ) . on ( 'click' , function ( ) {
76
76
formfield = $ ( this ) . attr ( 'rel' ) ;
77
77
$ ( 'input#' + formfield ) . val ( '' ) ;
78
78
$ ( 'input#' + formfield + '_id' ) . val ( '' ) ;
You can’t perform that action at this time.
0 commit comments