Element.touchstart(handler)

给元素添加touchstart事件。


参数

handler 函数。事件句柄。


返回值

对象。元素。


使用
<svg id="svg" width="100" height="100"></svg>
var svg = Snap("#svg");
//轻触红色圈圈,1秒动画至蓝色
var c = svg.paper.circle(50, 50, 40).attr({
    fill: "#f00"        // 红色
}).touchstart(function() {
    this.animate({
        fill: "#00f"    // 蓝色
    }, 1000);   
});