Js file for slider solution