add touch events ; fix javascript codes