refactored rmButton() to use jquery