I have a jquery script like this:
$(document).on('click', '.someClass', function(e){
e.preventDefault();
// Some code...
});
I would like to rewrite this as:
blah = {
init: function() {
e.preventDefault();
// Some code...
}
}
$(document).on('click', '.someClass', blah.init);
But how do I pass the e variable to the object?
init: function(e) { ... }