updated javascript functionality for basics page