jQuery Show/Hide Question

前端 未结 2 669
傲寒
傲寒 2021-01-22 21:22

I\'m just trying to preform a very simple jQuery action.

I have two components: #safety and #safety-tab a, the #safety needs to be

2条回答
  •  情话喂你
    2021-01-22 21:36

    try return false as you are clicking on a link;

     $(document).ready(function() {
       $("#safety-tab a").click(function() {
         $(this).hide();
         $("#safety").removeClass("hide");  
         return false;
       });
       });
    

提交回复
热议问题