added java script and toggle