Users upload image and thumbnail show up in the div OK, but when the value of the input change (update with Wordpress Media Uploader) it doesn't change the thumbnail by running the command after change, only the value in input will change. Thank you everyone in advanced.
Function i wanna fix:
/*Check for Favicon and Place it into Thumbnail*/
var checkFaviconField = jQuery('#faviconImageURL').bind();
if (checkFaviconField){
jQuery('#favicon').append("<img height='48px' src='"+imageUrl+"'/>");
}
Here is the full code:
var activeUpload = false;
jQuery(document).ready(function() {
jQuery('.uploadButton').click(function() {
activeUpload = true;
retrievefieldID = jQuery(this).prev().attr('id');
Fields = jQuery('#'+retrievefieldID).attr('name');
tb_show('', 'media-upload.php?type=image&TB_iframe=true');
if (activeUpload == true) {
var previousFunction = window.send_to_editor;
window.send_to_editor = function (html) {
imageUrl = jQuery('img', html).attr('src');
jQuery("#"+retrievefieldID).val(imageUrl);
tb_remove();
/*Check for Favicon and Place it into Thumbnail*/
var checkFaviconField = jQuery('#faviconImageURL').bind();
if (checkFaviconField){
jQuery('#favicon').append("<img height='48px' src='"+imageUrl+"'/>");
}
}
}
activeUpload = false;
});
});