The jQuery :nth-child selector has an "index" argument which is 1-based. But the jQuery "index" method, which is arguably the converse of the selector, returns a 0-based result. This is very easy to work around once you’re aware of it, but it’s surprising in a library which is, generally, designed both well and consistently.
-
Links
-
Tags
.NET anonymous methods architecture asp.net mvc C# California Change Manager COBOL CodeRage columbus columbus architecture group Delphi delphi prism Embarcadero entity framework Erlang functional programming generics givecamp halting problem humor InterBase javascript jqGrid jQuery links linq linq to sql memoize merb Mike Rozlog modeling mvc ndepend Nick Hodges orm poetry rails software archeology static analysis systems the dynamic web unit testing uris WebCategories
-
Recent Comments
- AL on join in LINQ to SQL and LINQ to Entities Considered Messy, Redundant
- AL on join in LINQ to SQL and LINQ to Entities Considered Messy, Redundant
- Surendran Bangalore on Generics, Commas, and Semicolons
- Surendran Bangalore on Generics, Commas, and Semicolons
- Eran on Using jqGrid with ASP.NET MVC: Search and Formatting
-
{ 1 } Comments
Yep, banged my head over this too
But I guess they had no choice, as the CSS 3 specification says nth-child indexing is 1-based: http://www.w3.org/TR/2001/CR-css3-selectors-20011113/#nth-child-pseudo
Post a Comment