I need to select the elements with id which starts with 'start-' and ends with 'end-' string. How to get this done using jquery selector? One line selector please?
Asked
Active
Viewed 57 times
0
-
possible duplicate http://stackoverflow.com/questions/609382/jquery-selector-id-ends-with – Awea Aug 18 '12 at 18:47
1 Answers
1
Well that answer would select two types both thoose who end- without having start and the other way around the right answer would be this one
$('[id|="start"][id$="end-"]')

Breezer
- 10,410
- 6
- 29
- 50