0
I have several divs
with the same class, inside them has the text "FREE" or "PAID", in which contains the text "FREE" need to have a color and "PAID" other. I used :contains()
but how they are divs
of the same class all the same colour.
0
I have several divs
with the same class, inside them has the text "FREE" or "PAID", in which contains the text "FREE" need to have a color and "PAID" other. I used :contains()
but how they are divs
of the same class all the same colour.
0
You can use the :contains tag itself, as an example I did.
$(document).ready(function(){
$("div.divLista:contains('FREE')").css("background","red");
$("div.divLista:contains('PAGO')").css("background","green");
});
Follow the code on the fiddle:
https://jsfiddle.net/nnksesdm/2/
I hope I’ve helped.
Doubt I’m at your disposal.
Browser other questions tagged jquery
You are not signed in. Login or sign up in order to post.
Man, thank you so much! It worked perfectly :D Thank you so much
– user64576
Show!! do not forget to evaluate the question positively. ;)
– Junior Porfirio