Last active
November 12, 2015 20:27
-
-
Save jonwolfe/5b4d63b9df7a54cae928 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.fn.e = (eventName, callback) -> | |
console.log 'eventName: ' + eventName + ' callback: ' + callback | |
$(document).on eventName, this, (event) => | |
console.log 'this.html(): ' + this.html() + ' event.currentTarget: ' + event.currentTarget | |
el = $(event.currentTarget) | |
callback(event, el) | |
$('[showmodal]').e 'click', (e, el) -> | |
href = el.attr('href') | |
console.log 'click callback called! modal: ' + href | |
modal = $ href | |
show modal |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment