Skip to content

Instantly share code, notes, and snippets.

@genecyber
Created May 29, 2015 14:07
Show Gist options
  • Save genecyber/5e9d2dd5363efdbd79be to your computer and use it in GitHub Desktop.
Save genecyber/5e9d2dd5363efdbd79be to your computer and use it in GitHub Desktop.
Namespaced click binding
function bindClicks() {
/* Unbind by localnamespace (Awesome way to unbind a selective everything) */
$(document).unbind(".customBindings")
/* Join Chat */
$("a[href='#lobby']").bind("click.customBindings", function () {
joinLobby()
})
/* Save Generated Address */
$(document).on('click.customBindings', '#saveKeysBtn', function () {
saveGeneratedAddress()
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment