Skip to content

Instantly share code, notes, and snippets.

@tony-o
Created July 19, 2012 18:18
Show Gist options
  • Save tony-o/3145786 to your computer and use it in GitHub Desktop.
Save tony-o/3145786 to your computer and use it in GitHub Desktop.
jhsto
var outsiderID;
$("#kelvarnsen").on('event',function(){
var id = $("#artvandelay").attr("id");
outsiderID = id;
});
$("pennypacker").on('event',function(){
//ASSUMES #kelvarnsen event was already triggered
console.log("ID: " + id); //outputs ID: undefined
console.log("Outsider ID: " + outsiderID); //outputs Outsider ID: artvandelay
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment