title: jQuery if/else statement CSS
body: <p>I have an interesting problem that I don't understand. It's a simple jQuery if else statement, but it's not working. Why is it not working?</p>
  
  <p>Code:</p>
  
  <pre><code>$("#div").click(function(){
  
      if ( $("#div2").css("background-image") === "url(img/image.png)") {
          alert('OK');
      }
      else {
          alert('NG');
      }
  
  });
  </code></pre>
  
  <p>But when I change <code>.css("background-image") === "url(img/image.png)"</code>, for example, to <code>.css('position') === 'absolute'</code>, it's working.</p>