title: How to find a word within an href link in a div element using jquery
body: <p>There is a div element that always contain one of the array words inside an a href element. Depending on what the word is, I need the web page to redirect to a different page. I'm not sure what I a missing. </p>
  
  <p><a href="http://jsfiddle.net/5Legahgn/5/" rel="nofollow">http://jsfiddle.net/5Legahgn/5/</a></p>
  
  <pre><code> if ($('.container-fluid:contains("It looks something like this")').length &gt; 0 || ($('.container-fluid:contains("Have you visited")').length &gt; 0)) {
  var uTest = ["Saggitarius", "Quentin", "Cinthia", "Maleria", "Pete", "Library", "wizard"];
  var aTest = uTest.length;
  var i = 0;
  for (i; i &lt; aTest; i++) {
      if ($('.container-fluid:contains("'+uTest[i]+'")').length &gt; 0) {
          var mTest = uTest[i];
          if (mTest != null || undefined) {
              switch (mTest) {
                  case "Saggitarius":
                      window.location.href = 'https://subeta.net/quests.php/saggitarius';
                      break;
                  case "Quentin":
                      window.location.href = '...';
                      break;
                  case "Cinthia":
                      window.location.href = '...';
                      break;
                case "Maleria":
                      window.location.href = '...';
                      break;
                  case "Pete":
                      alert("Pete");
                      break;
                case "Library":
                      window.location.href = '...';
                      break;
                case "wizard":
                      window.location.href = '...';
                      break;
                  case "Mori":
                      window.location.href = '...';
                      break;
              }
          } else {
              alert("done");
          }
      }
  }
  </code></pre>
  
  <p>}</p>