title: if $('img').attr("src", "")
body: <p>I'm trying to use jQuery to edit the SRC of an image if it's blank. Here's my current code:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
      $(document).ready(function() {
          var $this = $(this),
              img = $('img');
          if img.attr("src", ""){
              $this.attr("src", "default.gif");
          }
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>It's not working. The current error I get in my Chrome Console is:<br />Uncaught SyntaxError: Unexpected identifier<br /><br />
  Can anyone help out? Thanks a lot in advanced.<br />
  - Jordan.</p>