I have delete buttons that are added to the page dynamically.
I use this, for when delete is pressed:
$('#gallery').on('click', '.btn-delete', function(){
});
But how can I get the instance of the delete button pressed inside the on fnc? I've tried this, but no luck:
$(this).addClass('btn-danger');