update js for carousel