Adding a drawer function to js.