Team:GeorgiaState/Header
From 2011.igem.org
(Difference between revisions)
(Created page with "__NOTOC__<html lang="en"> <head> <div class="jimgMenu"> <ul> <li class="landscapes"><a href="#</a></li> <li class="people"><a href="#">People</a></li> <li class...") |
|||
Line 26: | Line 26: | ||
// if the element is currently being animated | // if the element is currently being animated | ||
if ($(this).is(':animated')) { | if ($(this).is(':animated')) { | ||
- | $(this).stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"}); | + | $(this).addClass("active").stop().animate({width: "310px"}, {duration: 450, easing:"easeOutQuad", complete: "callback"}); |
} else { | } else { | ||
// ease in quickly | // ease in quickly | ||
- | $(this).stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"}); | + | $(this).addClass("active").stop().animate({width: "310px"}, {duration: 400, easing:"easeOutQuad", complete: "callback"}); |
} | } | ||
}, function () { | }, function () { | ||
// on hovering out, ease the element out | // on hovering out, ease the element out | ||
if ($(this).is(':animated')) { | if ($(this).is(':animated')) { | ||
- | $(this).stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"}) | + | $(this).removeClass("active").stop().animate({width: "78px"}, {duration: 400, easing:"easeInOutQuad", complete: "callback"}) |
} else { | } else { | ||
// ease out slowly | // ease out slowly | ||
- | $(this).stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"}); | + | $(this).removeClass("active").stop(':animated').animate({width: "78px"}, {duration: 450, easing:"easeInOutQuad", complete: "callback"}); |
} | } | ||
}); | }); | ||
}); | }); | ||
</script> | </script> |
Revision as of 10:40, 6 July 2011