removed js error, added touch event for tablet