JS/CSS Slide effect works in fiddle, not in html

前端 未结 1 1114
执念已碎
执念已碎 2021-01-29 12:33

My first problem was about the fiddle not working. Now it works, but if I copy it into my brackets file it doesn\'t work anymore. I did include the link that I placed in the ext

相关标签:
1条回答
  • 2021-01-29 13:13

    Put

    $(".trigger").click(function() {
        $(".content").toggleClass("open");
    });
    

    Inside

    $(document).ready(function(){
        $(".trigger").click(function() {
            $(".content").toggleClass("open");
        });
    });
    
    0 讨论(0)
提交回复
热议问题