This content has been marked as final.
Show 1 reply
-
1. Re: jquery not firing blur event
blabno Oct 1, 2009 9:42 AM (in response to scphantm.scphantm.gmail.com)First of all your selector is wrong for it is not preceeded with hash (should be '#zip').
Also note that jQuery has problem with JSF-like ids separated with colon (:).
If your id is 'someForm:zip' then selector should be '#someForm\:zip'.You can try one of following :
<input type="button" value="Blur" onclick="jQuery('##{rich:clientId('zip').replaceAll(':','\\\\\\\\:')}').hide()"/>
or :
<rich:jQuery query="blur()" selector="#zip" name="blurZip"/>
which will create JS function named blurZip and you could attach it somewhere.
or :
<input type="button" value="Blur" onclick="jQuery(#{rich:element('zip')}).hide()"/>