I’m trying to unmount a SortBy widget that I have customized, so I need to clear the widget’s container. How can I access the container that was passed into the widget on creation?
In the documentation, the container is just hard-coded into the unmount function:
function unmount() {
$("#hits").remove();
}
However, I have multiple instances of these widgets and need to access the container from the unmount function. In the source, the unmount function is called with no arguments. Ideally, it would pass in the widget parameters including the container, so that it can be unmounted properly.
Is there any other way to do this?