I came to issue with tables when was trying to use selectors at <td> tags when have rowspan and colspan. There is no way to do correct and flexible selection. For example I have a table:
<table>
<tr>
<td rowspan="2">Element 1</td>
<td>Element 2</td>
<td>Element 3</td>
</tr>
<tr>
<td>More element 2</td>
<td>More element 3</td>
</tr>
</table>
In this situation, I have a table with rowspan and trying to do selection:
$("tr").each( function() {
$("td:first", this).addClass("first");
});
And getting this result:
<table>
<tr>
<td rowspan="2" class="first">Element 1</td>
<td>Element 2</td>
<td>Element 3</td>
</tr>
<tr>
<td class="first" >More element 2</td>
<td>More element 3</td>
</tr>
</table>
Is there any way to have jQuery to be more smart in similar situations with tables and rowspan/colspan selecting process? For example, to use some kind flag to do needed selection?
I want to ask to implement to jQuery Core the option to add custom tags to "nodeNames" that are used in the support of HTML5 tags in older IEs.
Before jQuery 1.7 I was using innerShiv ( http://jdbartlett.com/innershiv/ ) that was providing the support of HTML5 tags for older IEs. In the jQuery release blog: http://blog.jquery.com/2011/11/03/jquery-1-7-released/ at "Better Support for HTML5 in IE6/7/8" we have no need to use innerShiv any more. That is awesome, as it solved a lot of issues with IE! But some time ago I've started using in my work more tags that are not in HTML5 list. For example, I was using <page> tag in locators, <chapter> - to specify user input chapters markup, <data> - as a data holder that has logical scheme, etc. When innerShiv appeared, I've modified list of tags in it and was able to utilize it in my work. Sure, before it, I was using classes for those kind of things <div class="page">, <div class="chapter">, etc., same as other people. But with custom tags we may provide more flexible approach in HTML page and content markup. HTML5 already has good new tags, but it may grow up with more. But we still need to have the older IEs support.
I and a lot of more people thankful very much for having HTML5 tags support in jQuery Core, but we all be thankful more if there will be a way/option to add more custom tags to built in support.