making tabs automatically change

making tabs automatically change

i have it so my tabs will fade in/out when i click on them using the UI, how do i make this action happen automatically after a certain period of time even if they havent changed the current tab manually?

  1. $(document).ready(function() {
        $("#tabs").tabs({ fx: { opacity: 'toggle' } }, { selected: 1 });
    });

  1. <div id="tabs">

        <div id="fragment-1">
           
            <h1>One</h1>

            <p>This is a test tab.</p>
       
        </div>

        <div id="fragment-2">
           
            <h1>Two</h1>

            <p>This is a test tab.</p>
       
        </div>

        <div id="fragment-3">
           
            <h1>Three</h1>

            <p>This is a test tab.</p>
       
        </div>

        <ul>
        <li><a href="#fragment-1">Tab 1</a></li>
        <li><a href="#fragment-2">Tab 2</a></li>
        <li><a href="#fragment-3">Tab 3</a></li>
        </ul>
           
    </div>