create a gallery slide in JS