Is it possible words in a jquery selector line. For example if i wanted to use yellow and blue could i just include it somehow by adding a colon or something or do i have to repeat the script over and over for each word.
<script>
$(document).ready(function(){
$("p:contains(yellow)").css(
{"background-color":"lightblue",
"color":"darkblue",
"border":"1px inset dodgerblue",
"border-radius":"10px",
"padding":"3px 10px",
"font-size":"18px",
"font-family":"arial",
"text-shadow":"1px 2px 3px blue"
});
});
</script>
The script that i am using above does not seem to allow this, perhaps i am approaching this all wrong, i have tried different seperators such as the comma, colon, semicolon. what i am looking for is some like the snippet below.
$("p:contains(yellow, blue, green)")
Any help would be appreciated
Thanks