jquery plugin for the onAddRemove method