title: How to compare ul li text and array value
body: <p>I am working in jQuery Vector Map, user selected region names I have to added in UL li tag. I done it so for, whenever user click vector map region, corresponding region value getting updated in li tag.</p>
  
  <p>Now I have to do the condition, </p>
  
  <p>If user selected region value is already there in li list item. I have to show alert ('user selected region is already in the list');</p>
  
  <p>if user selected region value is not there in li item, I have to added the region value to li item.</p>
  
  <p>Here the sample code - ( user selected region state value i am getting in "region" )</p>
  
  <pre><code>   var regionList = new Array('Alaska','Alabama','Arkansas','Arizona', etc....) /* sample array*/
  
  
     if( li item text value  == arrayvalue) /*exact condition statement I want*/
     {
         alert("user selected region already in the list")
  
     }
      else
     {
            $('&lt;li&gt;' + region + '&lt;/li&gt;').appendTo('ul#location-selected');
     } 
  
  
     &lt;ul id="location-selected" style="font-weight:bold;width:350px;padding-top:15px;color:red;"&gt;&lt;/ul&gt;
  </code></pre>
  
  <p>Please help me to complete this..</p>