updated .js file

added a dropdown function.