我是一个新手,但我正在尝试创建一个圆环图,其中的部分在单击时缩放更大,然后当单击不同的部分时,第一部分返回到原始大小,新部分缩放更大。
我有图表和点击缩放,但现在我只能通过鼠标悬停让该部分恢复到原始大小。
这是我的代码:
p.click(function () {
p.stop().animate({transform: "s1.1 1.1 " + cx + " " + cy}, ms, "elastic");
txt.stop().animate({opacity: 1}, ms, "elastic");
}).mouseout(function () {
p.stop().animate({transform: ""}, ms, "elastic");
txt.stop().animate({opacity: 0}, ms);
});
小提琴:http: //jsfiddle.net/dll416/70twee1o/1/