I have a little problem
I am trying to use MartkItUp JQuery rich text editor on JSF textarea component.
My form looks like this:
<h:form id="comment">
<h:inputTextarea id="commentBody" cols="10" rows="10" value="#{postComment.commentBody}" required="true" requiredMessage="Comment Body is reqguired" >
<f:validateLength maximum="500" minimum="2" />
</h:inputTextarea>
<%-- more of the form... %-->
The problem is that on output it gives me the id for textarea like that
id="comment:commentBody"
When I try in JQuery to point to it nothing happens.
$('#comment:commentBody').markItUp(mySettings);
I had a plain textarea before, and there was no problem. Now, I have a lot of them.
How do I point to id in JQuery, thats looks like comment:commentBody
P.S: I know i can point to this text area by $(‘textarea’).markItUp(mySettings); however i am looking for solution to point to specific text area by it’s ID.
Try this,
$('#comment\\:commentBody'), for JQuery version 1.1.3 or greater.