Hi,, This is what i change so far.. But it always execute the alert each time the image is loading.
$.fn.image = function(src, f){ return this.each(function(){ var i = new Image(); i.src = src; i.onload = f; *i.onclick = alert(c);* this.appendChild(i); }); } $("#thumbnail").image(returData[0],*"satu"*,function(){}); Thanks.. Regards. Amdys