Html element contains complex & unique id, composed from namespace as prefix and incremented index - as postfix.
I try do it with wildcard expression for id.
If to use simple way without namespace, that it works fine:
$j("[id*=service_selected_]").click(function(){
...
In order to keep uniqueness,i need provide namespace part within id,but it doesn't resolved this way:
var selId = "'" + '[id*=' + namespace + '_service_selected_]' + "'";
$j(selId).click(function(){
...
Below the .jsp part:
<c:forEach var="package" items="${packages.page}" varStatus="status">
<tr>
<td>
${package.name}
</td>
<td id="<portlet:namespace/>_service_price_${status.index}">${package.price}</td>
<td >
<input type="checkbox" name="service_id" value="${package.id}" id="<portlet:namespace/>_service_selected_${status.index}">
</td>
</tr>
</c:forEach>