Basically, I want to use a class to select elements to receive delegated click event listeners. But I want to remove the class immediately after that.
This is what I had in mind:
docSelector // $(window.document)
.on('click touchstart', btnSelector, click[name])
.queue(function() {
// remove class to prevent extra binding
$(btnSelector).removeClass(btnSelector);
});
I think it should be clear what I am trying to do, but I'm not sure queue
even works for this kind of thing. I'm not super familiar with jQuery, but am working on someone else's code who uses it liberally. Thanks in advance.
In other words, I guess I'm looking for a generic method for tacking a callback on the end of chain.