Jquery and delete dependencies