Help adding a "changed" callback function to existing plugin (not written by me)
Hi,
My jQuery skills are not that wonderful, and wanted to ask if someone can help me modify this plugin.
Basically I need to be able to specify a callback event that need to be fired after line 56.
Code:
preview.html('<img src="' + e.target.result + '" ' + (preview.css('max-height') != 'none' ? 'style="max-height: ' + preview.css('max-height') + ';"' : '') + ' />');
The reason is that while this plugin works fantastic, the moment a new image are loaded in the the "preview" div, I need to apply a jCrop call to it (which is the next step)
Pretty please...been swearing the better part of the afternoon here.
For what it matter, here's a demo calling the plugin : http://jasny.github.com/bootstrap/ja...tml#fileupload
Re: Help adding a "changed" callback function to existing plugin (not written by me)
Trigger Event:
$('body').trigger("SOME_EVENT");
Listener:
$('body').bind("SOME_EVENT", function(){
alert('triggered');
});