selection based on attributes
Inconsistancy inside JQuery counting method: 1-based system vs 0-based system