how can i extract text after hash # in the href part from a tag?

前端 未结 8 1547
情话喂你
情话喂你 2021-02-07 02:22

I have following a tags:

Any tab1 Label
tab2 Label
Any tab3 Label<         


        
8条回答
  •  长发绾君心
    2021-02-07 02:56

    You can use something like this:

    ...
    var activeTab = $(this).attr("href");
    $(activeTab).fadeIn();
    ...
    

    This use href="#tab-id" for locate #tab-id element you want, and fade in.

提交回复
热议问题