0

I am trying to remove a div that contains specific words.

Here's the sample jquery code:

var someArray = [ 'someword', 'someword2', 'someword3' ]; for (var i = 0; i < someArray.length; i++) { $("div:contains('"+someArray[i]+"').remove(); } 

Only the divs including the word "someword" is removed, but not "Someword, SOMEWORD, soMeWoRd" etc.

How do I make the array case insentisive matching both combinations?

2

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.