尊敬的人...
我正在研究一个时间轴滚动器,当我向左滚动时它给我带来了问题....
这些值不是线性减去而是交替相加...
我已经检查了很多次js,但无法弄清楚......
http://codepen.io/akashdevaraju/pen/tiesa
$("#right,#left").click ->
id = this.id
patt = /\d+/g
circles = $(".circle")
if id is "right"
for cir in circles
left = $(cir).css("left")
lef = parseInt(left.match(patt))
le = lef - 80
$(cir).css("left","#{le}px")
else
for cir in circles.toArray().reverse()
left = $(cir).css("left")
lef = parseInt(left.match(patt))
le = lef + 80
$(cir).css("left","#{le}px")
请帮忙...