Hi Mohit,
Add a styleclass=”” to your components, then use jQuery’s selectors. You can’t use Id because it has to be set to a static item.
<apex:pageBlockSection columns=”1″>
<apex:outputPanel id=”relatedListSelect”>
<apex:repeat value=”{!relatedListNames}” var=”relList” id=”theRelLists”>
<apex:inputCheckbox styleClass=”{!relList.relListName} inputIsChecked” value=”{!relList.selected}”/>
<apex:outputText value=”{!relList.relListName}”/><br/>
</apex:repeat>
</apex:outputPanel>
</apex:pageBlockSection>
Then in jQuery you can do:
<script type=”text/javascript”>
$(‘.inputIsChecked’).each(function(i,o){
$(o).is(‘:checked’);
//can get the name of the element here in a variety of ways,
//split the classes and take the one that is the name of the list-element.
});
</script>
Thanks.