Stay on a current tab after after submitting a form using jQuery

后端 未结 8 602
一生所求
一生所求 2021-01-18 08:14

I\'m trying to stay on a specif tab ( in this case tab2 ) but after clicking the submit button the tab reverts to tab 1 which has the default class of active. I have hit a b

8条回答
  •  生来不讨喜
    2021-01-18 08:43

    Try this

    
    

    Put this in your coding and change the script as follows

    $("#accordion").accordion({
    header: "h3",
    autoHeight: false,
    event: "mousedown",
    active: activeIndex,
    ui: "PageName.aspx",
    change: function (event, ui) {
    var index = $(this).accordion("option", "active");
    $('#<% =hidAccordionIndex.ClientID %>').val(index);
    }
    });
    

提交回复
热议问题