add javascript and sliding animation