一、选择器

  单选按钮:$(this).find(".answer").find("input[name='answer_" + id + "']:checked")

 

二、slideDown()、slideUp()

  实现展开

    function initAreaClick(){
        $(document).on("click",".content_problem",function(){
            var $answer = $(this).find(".answer");
            if ($answer.is(":hidden")) {
                $answer.stop(true,true).slideDown();
            } else {
                $answer.stop(true,true).slideUp();
            }
        });
    }

展开前:

jquery的一些用法

展开后

jquery的一些用法

 

相关文章:

  • 2021-12-23
  • 2021-05-24
  • 2021-06-08
  • 2021-12-24
  • 2021-12-28
  • 2021-10-31
  • 2022-12-23
  • 2021-04-21
猜你喜欢
  • 2022-12-23
  • 2021-09-24
  • 2022-02-09
  • 2022-02-05
  • 2022-02-24
  • 2022-03-08
相关资源
相似解决方案