Keep URL unaffected when anchor link is clicked (ok)

https://stackoverflow.com/questions/17012592/keep-url-unaffected-when-anchor-link-is-clicked

2 cái này kết hợp với

https://app.gitbook.com/@javascriptuse/s/advanced/jquery-i-want-to-add-an-active-class-to-the-linked-id-of-an-anchor-tag-ok

$( ".vc_tta-tab a" ).on( "click", function(e) {
    e.preventDefault();
    $($(this).attr('href')).addClass('vc_active').siblings().removeClass('vc_active');
    var hash = this.hash;
    $(this).parents('ul.vc_tta-tabs-list').children().removeClass('vc_active');
    $(this).parent().addClass('vc_active');
    window.location.hash = "";
  });
window.location.hash = ""  

Last updated

Navigation

Lionel

@Copyright 2023