how to bind custom event


Bind the onError event. 
 
$('selector').bind('onError',{msg:"error occured"},false); 
 
This event is triggered whenever error is occurred as below: 
 
$("selector").trigger("onError",handler); 
 
function handler(e) 
{ 
alert(e.msg); 
}

Leave a Reply

Your email address will not be published.