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
Post a Comment