小编djm*_*ank的帖子

两次单击后jQuery动画不起作用

我正在尝试通过jQuery处理动画,我遇到了一个问题,即div框只能工作2次.任何形式的帮助表示赞赏.这是我的代码:

$(document).ready(function() {
  $("#one").click(function() {
    $("div").animate({
      top: '250px'
    });
  });

  $("#sec").click(function() {
    $("div").animate({
      bottom: '250px'
    });
  });

  $("#thi").click(function() {
    $("div").animate({
      right: '250px'
    });
  });

  $("#for").click(function() {
    $("div").animate({
      left: '250px'
    });
  });
});
Run Code Online (Sandbox Code Playgroud)
.box {
  background: grey;
  height: 20px;
  width: 20px;
  position: absolute;
}
Run Code Online (Sandbox Code Playgroud)
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<button id="one">DOWN</button>
<button id="sec">TOP</button>
<button id="thi">LEFT</button>
<button id="for">RIGHT</button>

<br><br>
<div class="box">
</div>
Run Code Online (Sandbox Code Playgroud)

这是我的代码链接:https://jsfiddle.net/djmayank/mcutmbcy/1/

html javascript css jquery jquery-animate

6
推荐指数
1
解决办法
285
查看次数

如何通过 API 在调查猴子中获取文本响应

我目前正在使用 v3 API 收到来自 SurveyMonkey 的回复......

我正在使用/collectors/{id}/responses/{id}/details电话,并成功获得了响应。但是 resp 得到了 ID 而不是文本值,例如

           {
                "id": "111788228",
                "answers": [
                    {
                        "choice_id": "828117913"
                    }
                ]
            }
Run Code Online (Sandbox Code Playgroud)

1) 我可以让 SM 给我发送文本答案吗?

2)如果我不能使用choice_id获取文本值。

提前致谢。

surveymonkey

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

标签 统计

css ×1

html ×1

javascript ×1

jquery ×1

jquery-animate ×1

surveymonkey ×1