I have 4 buttons using the jQuery UI "button". 3 work flawlessly. the fourth doesn't seem to want to always use the jquery ui hover class "u-state-hover" when it freezes. it does some time, but most of the time it only applies the "hover" class (I look at it in firebug), and this clearly does not match the css styles. Does anyone know what could be causing the mismatch?
EDIT: I think this is a conflict between the user interface and Ajax Uploader. here is some stripped down code I'm using.
$('.upload_img').button({
icons: {
primary: 'ui-icon-folder-open'
},
label: "Browse"
})
jQuery('.upload_img').each(function(){
var button = jQuery(this);
var ID = jQuery(this).attr('value');
var container = jQuery(this).parent();
$(this).click(function() {
return false;
});
new AjaxUpload( button, {
action: ajaxurl,
name: ID ,
data: {
action: 'save_function',
type: 'upload',
_nonce: '<?php echo $nonce; ?>',
key: ID },
onSubmit: function(file , ext){
this.disable();
},
onComplete: function(file, response) {
this.enable();
if(response == 99){
show_message(5);
t = setTimeout('fade_message()', 2000);
}
else{
show_message(4);
t = setTimeout('fade_message()', 2000);
}
}
});
});
source
share