这是原剧本...
$j(document).ready(function() {
//Show and hide the Loading icon on Ajax start/end
$j('.bwbps_uploadform').submit(function() {
$j('#bwbps_message').html('');
bwbpsAjaxLoadImage(this);
return false;
});
//make sure the upload form radio button is on Select file
$j(".init_radio").attr("checked","checked");
//Add OnClick to the Mass Update Buttons in the PhotoSmash Settings form
if ($j('#bwbps_gen_settingsform').val() == '1') {
bwbpsAddPSSettingsMassUpdateActions();
}
$j('.bwbps-post-cat-form').attr('multiple','multiple');
}
});
我想更改此脚本以在另一个函数中调用它,但是 firebug 中存在语法错误:
var myFunction;
$j(document).ready(function() {
//Show and hide the Loading icon on Ajax start/end
myFunction = function() {
$j('.bwbps_uploadform').submit(function() {
$j('#bwbps_message').html('');
bwbpsAjaxLoadImage(this);
return false;
});
//make sure the upload form radio button is on Select file
$j(".init_radio").attr("checked","checked");
//Add OnClick to the Mass Update Buttons in the PhotoSmash Settings form
if ($j('#bwbps_gen_settingsform').val() == '1') {
bwbpsAddPSSettingsMassUpdateActions();
}
$j('.bwbps-post-cat-form').attr('multiple','multiple');
}
});
怎么了?有谁能够帮我??
var $j = jQuery.noConflict();
感谢您的帮助!