小编Wil*_*ill的帖子

(t/= d/2)在此代码中的含义是什么?

jquery.easing插件中有许多像这样的方法:

easeInOutQuint: function (x, t, b, c, d) {
    if ((t/=d/2) < 1) return c/2*t*t*t*t*t + b;
    return c/2*((t-=2)*t*t*t*t + 2) + b;
}
Run Code Online (Sandbox Code Playgroud)

(t/=d/2) 正在严厉惹恼jshint!

Linting assets/js/_main.js ...ERROR
[L119:C13] E030: Expected an identifier and instead saw '='.
    if ( (t/=d/2) < 1) {
[L119:C14] E020: Expected ')' to match '(' from line 119 and instead saw 'd'.
[L119:C19] W116: Expected '{' and instead saw '<'.
[L119:C19] E030: Expected an identifier and instead saw '<'.
[L119:C19] W030: Expected …
Run Code Online (Sandbox Code Playgroud)

javascript jquery easing

2
推荐指数
1
解决办法
339
查看次数

标签 统计

easing ×1

javascript ×1

jquery ×1