Skip to content

Instantly share code, notes, and snippets.

View aestrro's full-sized avatar

Kevin Carr aestrro

  • Portland, OR
View GitHub Profile

Keybase proof

I hereby claim:

  • I am aestrro on github.
  • I am aestrro (https://keybase.io/aestrro) on keybase.
  • I have a public key ASAF1CmKMIiKNdENU6GxkDugdc9duNQLv1YmfbC_GtC6_go

To claim this, I am signing this object:

@aestrro
aestrro / trigger_someclass.js
Created October 2, 2015 18:33
Triggering Elements after DOM loaded
// Append anchor tag after DOM load
$('.container').append("\
<a href='#' class='someclass'>Give me a cookie?</a>\
")
// Attach click event to .someclass, et voilà
$(document).on("click",".someclass" ,function(e){
e.preventDefault();
console.log("ayyyyy!");
});