Assign the event to the element li and not the image. Because if you display
a text over the image, you will lose the event mouseover.

$(document).ready(function() {
   $("li.episode").mouseover(function ()  {
      $(this).addClass("background");
      $('div.details').addClass("show");
   });
   $("li.episode").mouseout(function ()  {
      $(this).removeClass("background");
      $('.details').removeClass("show");
   });
});

Reply via email to