Skip to content

Commit 70823ab

Browse files
committed
jQuery Modernisierung
1 parent ce19ff3 commit 70823ab

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

functions/metabox/js/cmb.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,30 @@ jQuery(document).ready(function ($) {
4949
$(this).after('<div id="picker-' + i + '" style="z-index: 1000; background: #EEE; border: 1px solid #CCC; position: absolute; display: block;"></div>');
5050
$('#picker-' + i).hide().farbtastic($(this));
5151
})
52-
.focus(function() {
52+
.on('focus', function() {
5353
$(this).next().show();
5454
})
55-
.blur(function() {
55+
.on('blur', function() {
5656
$(this).next().hide();
5757
});
5858

5959
/**
6060
* File and image upload handling
6161
*/
62-
$('.cmb_upload_file').change(function () {
62+
$(document).on('change', '.cmb_upload_file', function() {
6363
formfield = $(this).attr('name');
6464
$('#' + formfield + '_id').val("");
6565
});
6666

67-
$('.cmb_upload_button').live('click', function () {
67+
$('.cmb_upload_button').on('click', function () {
6868
var buttonLabel;
6969
formfield = $(this).prev('input').attr('name');
7070
buttonLabel = 'Use as ' + $('label[for=' + formfield + ']').text();
7171
tb_show('', 'media-upload.php?post_id=' + $('#post_ID').val() + '&type=file&cmb_force_send=true&cmb_send_label=' + buttonLabel + '&TB_iframe=true');
7272
return false;
7373
});
7474

75-
$('.cmb_remove_file_button').live('click', function () {
75+
$('.cmb_remove_file_button').on('click', function () {
7676
formfield = $(this).attr('rel');
7777
$('input#' + formfield).val('');
7878
$('input#' + formfield + '_id').val('');

0 commit comments

Comments
 (0)