Search code examples
jqueryicefaces

Jquery , selecting icefaces elements by ID


With jQuery, we do it like this:

 $(document).ready(function() {
   $("#orderedlist").append("Please rate: ");
 });

and de string appended to component with id orderedlist.

Using icefaces framework , i got a component with id form1:p i tried accessing it using followin code :

jQuery.noConflict();
jQuery("#form1:p").append("Please rate: ");

the string is appended to the form1 and not to the specified component with id form1:p


Solution

  • You need to escape the : with two backslashes

    jQuery("#form1\\:p").append("Please rate: ");
    

    See the note at the top of the selectors api page