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

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

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

iphone - How would you achieve a LED Scrolling effect? -