title: Value not equal to &nbsp OR value not eqal to space in jQuery
body: <p>how to detect <code>space</code> in jquery ? How to check a value equal to space or <code>&amp;nbsp</code> in jquery ?</p>
  
  <p>Please check this code .</p>
  
  <pre><code> Search:  &lt;input type="text" name="search-filter" class="search-filter" / &gt; 
            &lt;input type="submit" value="submit" class="search-img" &gt;
  
  $(".search-img").on("click",function(){
      var search_val=$(".search-filter").val();
  
       if(search_val!=="" &amp;&amp; search_val!==null ){
  
           alert(search_val);
  
        }
  });
  </code></pre>
  
  <p>Here when i just enter a space and click submit button it is alerting . </p>
  
  <p>Why this code is not working ? </p>