jQuery- show div on hover - hide div on mouseout

Question: How can we show div on hover and hide div on mouseout ?

Answer: Using below example code we can do this.

HTML
hover anchor

lorem ipsum dolor sit amet......

JS
(function(){
  var del = 200;
  $('.icontent').hide().prev('a').hover(function(){
    $(this).next('.icontent').stop('fx', true).slideToggle(del);
  });
})();

No comments:

Post a Comment