adds call to api on close of category div