Unique URL to each tab

I have 3 tabs in my ‘my-account’ page of my website.

when you go here for example:
https://mywebsitename.com/my-account/ you will have 3 tabs to choose from.

The problem is that when you go to tab 2 it’s the same URL.

I would like it to be

Here is my JS

(function($) {          

        $('ul.tabs li').click(function(){
            var tab_id = $(this).attr('data-tab');

            $('ul.tabs li').removeClass('current');



And here is what I have in my wordpress functions.php file

// The tabs in the my account page
function tabs() {
wp_enqueue_script( 'tabs', get_stylesheet_directory_uri() . '/scripts/tabs.js', array( 'jquery' ) );
add_action( 'wp_enqueue_scripts', 'tabs' );

Any help will be amazing,

Thank you

Read more here: Unique URL to each tab

Leave a Reply

Your email address will not be published. Required fields are marked *