change the class of the currently selected tab on next and previous button
<p>I want to change the css class of the currently selected tab on the click of the next and previous button. The next and previous click is working fine. However I also want to change the css class of the currently selected tab.</p>

<pre><code>$(".next-tab").click(function () {
            var selected = $("#tab-div").tabs("option", "selected");
            $("#tab-div").tabs("option", "selected", selected + 1);

        });

        $(".prev-tab").click(function () {
            var selected = $("#tab-div").tabs("option", "selected");
            $("#tab-div").tabs("option", "selected", selected - 1).addClass("current");
            var selected_tab = $(this).find("a").attr("href");
            $("#tab-div li a:not(first)").removeClass("current");
            $("#tab-div li a:first").addClass("current");
        });
</code></pre>

<p>Any advice or suggestions?</p>

<p>Thanks,</p>
