Could this just be `$el.find(".legend ul").empty()` or similar?