Say I want to make a little plugin called ‘alertMeOnRemove’, which is self explanatory. I want it to override the remove() function for just the elements it is called on.
$('a').alertMeOnRemove();
$('div').remove(); // no alert
$('a.subset-of-a').remove(); //alert
$('a').remove() //alert
I know general overriding of jQuery function is both possible and easy. Is this possible?
Yeah, that wouldn’t be difficult.