How do I control only firing an event once?
Actually, a quick google appears to elude to the fact that .one helps..
How do I control only firing an event once?
Actually, a quick google appears to elude to the fact that .one helps..
You can use jQuery's one
method, which will subscribe to only the first occurrence of an event.
For example:
$('something').one('click', function(e) {
alert('You will only see this once.');
});