【问题标题】:My Jquery animation is not working, nothing is showing up我的 Jquery 动画不工作,什么都没有出现
【发布时间】:2017-07-11 13:07:59
【问题描述】:
$("#run_anim").click(function(){
  var box = $('.anim_box')
  box.show()
  //going to add more this is just for testing
})

在我的网站 (torin.eschweb.com) 上,我正在尝试制作动画,到目前为止,我所拥有的只是在您按下按钮时显示 div 的部分,但没有显示任何内容。

【问题讨论】:

  • 您似乎更改了问题中包含的 URL 的内容。访问torin.eschweb.com 显示了一个带有两个输入的表单。我在这里看不到“动画”,以及与您给出和接受的答案相比,哪些代码失败了。这个问题在这方面还不清楚。

标签: javascript jquery animation effect


【解决方案1】:

请将事件监听器添加到 jQuery ready method

$(document).ready(function() {
  $("#run_anim").click(function(){
    var box = $('.anim_box')
    box.show()
    //going to add more this is just for testing
  });
});

【讨论】:

    猜你喜欢
    • 2022-09-28
    • 1970-01-01
    • 2014-10-10
    • 2018-11-07
    • 1970-01-01
    • 2012-07-24
    • 1970-01-01
    • 1970-01-01
    • 2016-09-12
    相关资源
    最近更新 更多