JSFiddle - React, Tailwind, and code Playground
by gryzzly
HTML
<a id='bla' href='#'>aaa</a>
<div>
<a href='#' id="remove">remove</a>
</div>
JavaScript
window.App = (function() {
var bla = $('#bla'), init, otherStuff;
init = function() {
bla.bind('click', function once(e) {
e.preventDefault();
alert('bla');
});
$('#remove').bind('click', function(e) {
e.preventDefault();
App.otherStuff();
});
};
otherStuff = function() {
bla.unbind('click', once);
};
return {
init : init
};
})();
App.init();