javascript - calling the jq function like you would do a js function from a form element -


i trying validate form using jquery (not use validate plugin)...what wanted know there way call same function without being attached particular node...

like in js

<input id="xyz" ....onblur=js:function()>  <input id="abc" ....onblur=js:function()> 

where in jq

$(#xyz).blur();  $(#abc).blur();  

not exact syntax it...

thanks andy

$(function() {   $(":input").blur(function() {      // executes function every time blur event     // fires on input element   }); } 

"input element" being input, textarea, select , button elements.

if want executed when blur event fires regular inputs, lose colon. hope got wanted achieve.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -