I would like to get all items that start with a specific ID. After a short search, the solution turned out to be this:
$('*[id^="foo_"]')
to select all items with an identifier starting with foo_. Although this selector syntax is very logical, I'm just wondering if this can be done more "shortly", for example:
$('#foo_*');
However, this did not work. Is there any support for this category?
source
share