title: Jquery Remove Image
body: <p>My overall problem is to lazy load images. I've gotten to the point where I'm loading the images only when they are on screen. I need to remove the images that are not on screen. </p>
  
  <p>I thought </p>
  
  <pre><code>$(image).removeAttr("src")
  </code></pre>
  
  <p>would do it and it rightly removes src, but it does not clear the image from the screen, nor does it replace it with what is in alt. </p>
  
  <p>How do I make it remove the image? Note, I do not want to remove the img tag (I need it for later), just clear the image from the screen. </p>
  
  <p>Other code that may be relevant(although why I don't know)-</p>
  
  <pre><code>updateCarImages:=&gt;
      imagesOnScreen = $(@el).find(".carImageClass:onScreen")
      imagesOffScreen = _.without(cachedImagesOnScreen,imagesOnScreen)
      for image in imagesOnScreen
        imgSrc = $(image).attr("src")
        if (!imgSrc)
          id = $(image).data("tooltip-id")
          console.log(id)
          result = resultsStore.get(id+"")
          console.log(result)
          $(image).attr("src", result.get("carImageUrl"))
      console.log(imagesOffScreen)
      for image in imagesOffScreen
        $(image).removeAttr("src")
  </code></pre>