views:

64

answers:

1

So i have a list of checkboxes that gets added dynamically - i am trying to style them using the jquery ui checkbox. problem is i can get styled just one. Is there any ways i could make any workaround to get dynamic id's on input tags and labels for each input tag via jquery ? here is the syntax i am trying:

<div id="format">
  <input id="check_<?php echo $category['category_id']; ?>" type="checkbox" name="selected[]"  value="<?php echo $category['category_id']; ?>" /><label for="check_<?php echo $category['category_id']; ?>">d</label>
</div>

jquery code:

    $(function() {
    $( "#check" ).button();
    $( "#format" ).buttonset();
});

Thanks!

A: 

Try this once:

$("input[id^='check_'] > label[for^='check_']").css('color', '#f3f3f3');
Sudhir
i really can't find any ways to integrate this and help me...
ciprian