Skip to content

Instantly share code, notes, and snippets.

@davidyeiser
Created March 8, 2011 05:39
Show Gist options
  • Save davidyeiser/859908 to your computer and use it in GitHub Desktop.
Save davidyeiser/859908 to your computer and use it in GitHub Desktop.
Associated jQuery for text explosion. As seen on http://gopotluck.com/
$(function() {
$("#email-signup-label").lettering();
var is_search_empty = $(".email-signup input").attr("value");
if (!is_search_empty == "") {
$("#email-signup-label").css({opacity:0});
}
$("#email-signup-label").click(function() {
$(".email-signup input").focus();
$("#email-signup-label").animate({opacity:0}, 250);
});
$(".email-signup input").blur(function() {
var is_search_empty = $(".email-signup input").attr("value");
if (is_search_empty == "") {
$("#email-signup-label").animate({opacity:1}, 250);
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment