Bug Tracker

Opened 6 years ago

Closed 6 years ago

#8849 closed bug (worksforme)

Selector issues

Reported by: findme@… Owned by: findme@…
Priority: undecided Milestone: 1.next
Component: selector Version: 1.4.4
Keywords: Cc:
Blocked by: Blocking:

Description

jQuery 1.4.4 selects all classes with the name share_posts when asked to select class name .share

so when i do

$('.share').length

i get 12, when there is only one element with class name share

$('.share_posts')

gives 11, which is correct.

Change History (2)

comment:1 Changed 6 years ago by timmywil

  • Component changed from unfiled to selector
  • Owner set to findme@…
  • Status changed from new to pending

Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket! Additionally, test against the jQuery (edge) version to ensure the issue still exists.

comment:2 Changed 6 years ago by addyosmani

  • Resolution set to worksforme
  • Status changed from pending to closed

I've created a test case based on the code you supplied here: http://jsfiddle.net/addyosmani/HT57m/ however using jQuery 1.5.1 and 1.5.2 there are no issues with class selectors (or .length) resulting in the behavior you've mentioned in your ticket. I also can't reproduce the behavior mentioned using jQuery 1.4.4. Closing as we can't reproduce but please feel free to check your markup to ensure there isn't any other code affecting what you're doing.

Note: See TracTickets for help on using tickets.