Posted By

hungheroic on 01/11/11


Tagged

toggle hover


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

aaearhart


Toggle show/hide a div by hovering another item


 / Published in: JavaScript
 

  1. <script type="text/javascript">
  2. $(document).ready(function() {
  3. var hide = false;
  4. jQuery("img.shadow").hover(function(){
  5. if (hide) clearTimeout(hide);
  6. jQuery(".post_share").fadeIn();
  7. }, function() {
  8. hide = setTimeout(function() {jQuery(".post_share").fadeOut("slow");}, 250);
  9. });
  10. jQuery(".post_share").hover(function(){
  11. if (hide) clearTimeout(hide);
  12. }, function() {
  13. hide = setTimeout(function() {jQuery("post_share").fadeOut("slow");}, 250);
  14. });
  15. });
  16. </script>

Report this snippet  

You need to login to post a comment.