Return to Snippet

Revision: 44481
at April 12, 2011 20:31 by root_hacker


Initial Code
// HELL YA
$('.unit').hover(function (e) {
    var isIn = e.type === 'mouseenter',
          $this = $(this);

        $this.toggleClass('unit-hover',isIn);
        $this.find('.thumb a')
                .children('.thumb_BW').toggleClass('hidden',isIn)
            .end()
                . children('.thumb_C').toggleClass('hidden',!isIn);

        $this.children('.arrow-details').toggleClass('hidden',!isIn);
});

Initial URL

                                

Initial Description
this is the way for toggling something on mouse hover in and out

Initial Title
juqery : toggling with mouse hover in and out

Initial Tags
jquery, best

Initial Language
JavaScript