代码之家  ›  专栏  ›  技术社区  ›  Tjtorin

我的Jquery动画不工作,没有显示任何内容

  •  -1
  • Tjtorin  · 技术社区  · 7 年前
    $("#run_anim").click(function(){
      var box = $('.anim_box')
      box.show()
      //going to add more this is just for testing
    })
    

    torin.eschweb.com )我正在尝试制作一个动画,到目前为止,我只有一个部分,使div显示当你按下按钮,但什么都没有显示。

    1 回复  |  直到 7 年前
        1
  •  1
  •   falinsky Giri Dharan    7 年前

    请将添加事件侦听器包装到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
      });
    });