Skip to content

Instantly share code, notes, and snippets.

@marti1125
Created September 5, 2012 02:46
Show Gist options
  • Save marti1125/3629533 to your computer and use it in GitHub Desktop.
Save marti1125/3629533 to your computer and use it in GitHub Desktop.
Foundtaion alert-box tip
var clearAlert = setTimeout(function(){
$(".alert-box.success").fadeOut('slow')
}, 5000);
$(document).on("click", ".success a.close", function(event){
clearTimeout(clearAlert);
});
$(document).on("click", ".alert-box a.close", function(event) {
event.preventDefault();
$(this).closest(".alert-box").fadeOut(function(event){
$(this).remove();
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment