added js code

Added js code with #attached