How to use an array with the selector "contains"?
I want to use an array with the selector contains, for example i have this jquery:
- $(".element:contains('word1'),.element:contains('word2'),.element:contains('word3')").each(function(){
- $(this).css("display","none");
- });
And i want to simplify using an array:
- var x = ["word1","word2","word3"];
- $(".element:contains(x)").each(function(){
- $(this).css("display","none");
- });
How can I do something like that?
Thanks in advance. :)