update js for slide effect