Home › Forums › JavaScript › Jquery Selecting ID's › Reply To: Jquery Selecting ID's
September 21, 2014 at 12:10 pm
#183762
__
Participant
turned out my code would not select by ID if there was another in on the input.
ID=”total” worked
ID=”someotherid total” didn’t workcan anybody explain why?
Because “total” and “someotherid total” are not the same ID. If you need your code to select things with different IDs, use a .class
or [data-attribute]
selector instead.