Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Javascript Event on Non-existent Element
$(document).on("mouseenter", ".foo", function(){
console.log("do something");
});
// for jquery versions < 1.7
$(".foo").live("click", function(){
console.log("do something");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment