views:

25

answers:

1

Subj.

For example...

<a href="#" act="check_all" with="category_checkbox">Check all</a>
<p>
  <input type="checkbox" name="category[1]" tag="category_checkbox" />&nbsp;Category 1
  <input type="checkbox" name="category[2]" tag="category_checkbox" />&nbsp;Category 2
</p>

PS: What advantages and disadvantages of this method? Please explain why. By the way, if you are using only id,classes for selecting items. please describe what names you are using for it?

A: 

Adding additional attributes to the markup feels dirty some how, so I've settled for classes and id prefixes.

Classes like: "click-capture" for setting up hijaxing in a nesting friendly way a la .live() and $(this).closest(".click-capture").laod(...)

Parenting in a 2 layer tree via #afd98f for parent and .afd98f for children.

Ryan Graham