Created
July 3, 2011 09:11
-
-
Save behrangsa/1062094 to your computer and use it in GitHub Desktop.
Fixed installAmination function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function installAnimation(inputElem, marginTopEnd, animationLength) { | |
$(inputElem).bind('input', function() { | |
var label = $(this).prev("label"); | |
var labelMarginTop = label.css('margin-top'); | |
label.stop(); | |
if ($(this).val().length > 0) { | |
animateMarginTop(label, marginTopEnd, animationLength); | |
} else if ($(this).val().length == 0) { | |
animateMarginTop(label, "0px", animationLength); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment