1

Possible Duplicate:
jquery or css selector? select all id’s that start with

I need to select all the elements with ids that start with "Monday_", example id="Monday_16"

Community
  • 1
  • 1
Justinas R.
  • 271
  • 1
  • 4
  • 17

2 Answers2

3

You can use attribute starts with selector:

$("[id^='Monday_']");

or better:

$("tagname[id^='Monday_']");

http://api.jquery.com/category/selectors/

Ram
  • 143,282
  • 16
  • 168
  • 197
2

You can use the attribute starts with selector to accomplish that:

$('[id^="Monday_"]')
Christofer Eliasson
  • 32,939
  • 7
  • 74
  • 103