I guess you are using this filter and each stuff to make sure that the current dropdown really is one of our dropdowns.
Wouldn't it be easier to just do self.close($(dropdown))?