I'm learning jQuery to integrate into a
JSF application but finding some confusion on the correct syntax especially when it comes to combining double and single quotes in the jQuery scripts. So for this particular page I want jQuery to traverse through a list of documents and put icons next to each document to state what type of document each is (ie: PDF,
doc, xls). I can get this to work using normal html markup but I get a
Syntax Error - Unexpected Token exception in the browser.
I'm confused about whether this means I need to use the right html references for the JSF element I wish to traverse or whether this is a problem with the way I'm using my quotes.
Also I'm not sure how to correctly reference jsf tags inside jQuery scripts. So for an ordinary html page I execute the following jQuery script:
</code>
Then I have a JSF page with the following commandLink:
For this page I try to execute the following script:
I get the same syntax error no matter what I put into the script of the JSF page. Would be grateful for any guidance on how to correctly integrate jQuery with JSF. Thanks in advance!