Bug Tracker

Changes between Version 1 and Version 2 of Ticket #8785, comment 1


Ignore:
Timestamp:
Apr 6, 2011, 10:09:11 AM (11 years ago)
Author:
addyosmani
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #8785, comment 1

    v1 v2  
    1 The reason your code wasn't working is because the selector you're attempting to query with is searching for an ID equal to 'ct' rather than an id beginning with 'ct'. What you want to be doing instead is using ^= to query for this collection. I've put you together a live demo of this working which functions fine in both Chrome latest and Firefox 4. http://jsfiddle.net/addyosmani/YRGW6/
     1The reason your code wasn't working is because the selector you're attempting to query with is searching for an ID equal to 'ct' rather than an id beginning with 'ct'. What you want to be doing instead is using http://api.jquery.com/attribute-starts-with-selector/ to query for this collection. I've put you together a live demo of this working which functions fine in both Chrome latest and Firefox 4. http://jsfiddle.net/addyosmani/YRGW6/