Changed the click tooggle functionality and deleted the custom event