I'm thinking about using custom attributes in Jquery to avoid using class or id attributes, to not interfere with the html designers.
Taking into account this idea, the html should be pieces like:
<ul Jquery="CommonUl">
<li Jquery="CommonLi"></li>
<li Jquery="CommonLi"></li>
<li Jquery="CommonLi"></li>
<li Jquery="CommonLi"></li>
<li Jquery="CommonLi"></li>
</ul>
Do you think this is a good approach?
What is your opinion about the W3C validation of these custom attributes?
Do you know any way to program with Jquery without interfering with the work of the html designers?
About the performance, I suppose that with class attributes or ids the jquery selectors are faster than using a custom attribute and filtering functions like "contains, etc...". Is this right?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…