asdf_enel_hak
asdf_enel_hak

Reputation: 7650

jquery ui tabs & accordion, triggerHandler('change') doesn't work for accordion

I have:

    var tabs = $('.tabs')
    tabs.each(function () {
        var hashHref = $.param.fragment();
        $(this).find("a[href='#" + hashHref + "']").triggerHandler('change');
    });

which works for tabs, howeve, I can't get worked the same for accordion.
Is there any specific case for accordions with triggerHandler('change').

Note: I can more post codes if need

Thanks

Upvotes: 0

Views: 573

Answers (1)

PetersenDidIt
PetersenDidIt

Reputation: 25620

Try using trigger click:

var tabs = $('.tabs')
tabs.each(function () {
    var hashHref = $.param.fragment();
    $(this).find("a[href='#" + hashHref + "']").trigger('change');
});

Upvotes: 1

Related Questions