Show div #id on click with jQuery

前端 未结 3 668
礼貌的吻别
礼貌的吻别 2020-12-08 11:30

When a div is clicked, I want different div to appear.

Thus, when \'#music\' is clicked, I want \'#musicinfo\' to appear.

Here is the css:

         


        
3条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-08 11:36

    This is simple way to Display Div using:-

    $("#musicinfo").show();  //or
    $("#musicinfo").css({'display':'block'});  //or
    $("#musicinfo").toggle("slow");   //or
    $("#musicinfo").fadeToggle();    //or
    

提交回复
热议问题