add touch events ; fix javascript codes

Fix bug for ipad/iphone