http://api.jqueryui.com/tabs/ Not strong in jquery, you need to add a separate link in the body of the tab to the next tab, I can not transfer the link to the backend, because this is displayed in a cycle and the links are dynamic, picked up from the database. Surely you can somehow find the active object, find its neighbor, pick up the href and insert it into the href of the desired link. Question in the syntax, help figure out, guys + event you have to handle some kind of something, click on the tab on the idea ... The idea is this, read the longrid in the tab, go to the very end, click on the link "read the next text" and the link turns on next tab, preferably of course also return to the beginning of the text to do

    1 answer 1

    Have you ever tried to read what is written in the documentation? the very first property is active

     $( "#tabs" ).tabs(); $("a.next").click(function(e){ e.preventDefault(); var activeIndex = $("#tabs").tabs("option", "active"); $("#tabs").tabs("option", "active", activeIndex + 1); }); 
     <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/smoothness/jquery-ui.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <script src="//code.jquery.com/ui/1.12.1/jquery-ui.js"></script> <div id="tabs"> <ul> <li><a href="#fragment-1"><span>One</span></a></li> <li><a href="#fragment-2"><span>Two</span></a></li> <li><a href="#fragment-3"><span>Three</span></a></li> </ul> <div id="fragment-1"> <p>First tab is active by default:</p> <pre><code>$( "#tabs" ).tabs(); </code></pre> </div> <div id="fragment-2"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </div> <div id="fragment-3"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. </div> </div> <a href="#" class="next">next</a>