0

I'm using script found here:

Automatically load an image using javascript

I'm using them to build image gallery where the main image loads thumbnail image on mouseenter, but my main image begins blank not with the first thumbnail as in the answer. I need to know how to clear the main image back to blank on mouseout of each thumbnail?

Community
  • 1
  • 1
ss89
  • 1
  • 1

1 Answers1

0

Try JQuery .mouseout() like this:

$('.thumbnails img').mouseout(function () {
    this.src = '';
});

Click http://jsfiddle.net/cnx65ev0/ to see it running. Hover over the images and when you leave them, they become blank. I hope this is what you wanted.

Aishwarya Shiva
  • 3,460
  • 15
  • 58
  • 107