40
rated 0 times
[
45]
[
5]
/ answers: 1 / hits: 23973
/ 10 Years ago, fri, june 6, 2014, 12:00:00
Can jQuery or JavaScript be used with a regex to select multiple elements with similar id?
I have the following paragraphs:
<p id=item5_2> A </p>
<p id=item9_5> B </p>
<p id=item14_2> C </p>
I want to change the content of paragraphs with id starting in item
and ending in 2
.
I used the following jQuery:
$(#item[d]*2).html(D);
but it doesn't work. How can I get it to work?
More From » jquery