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?

Soner
  • 3
  • 1
  • hi/selam soner, This question may help you: http://stackoverflow.com/questions/177719/javascript-case-insensitive-search – Barış Akkurt Apr 17 '13 at 22:36
  • This saved me: http://stackoverflow.com/questions/2196641/how-do-i-make-jquery-contains-case-insensitive-including-jquery-1-8 Sorry for duplicate. – Soner Apr 18 '13 at 01:48

0 Answers0