Next-Prev functionality for the jquery tabs

后端 未结 3 829
傲寒
傲寒 2021-01-24 03:39

I need Next, Previous functionality for the jquery tabs on clicking on the Next and Prev html buttons. I am using jquery.1.9.1.js and jquery-ui-1.10.2.custom.

3条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-01-24 04:42

    There is no select method for jQuery UI Tabs in this version. To get your functionality to work you need to change your code to

    var i=$('#ui-tabs').tabs( "option", "active"); //get selected tab index
    $('#ui-tabs').tabs( "option", "active", i+num ); // num is your tab choise (+1,-1)
    

    This is worked for me. Try this.

提交回复
热议问题