assaqqaf assaqqaf - 1 year ago 159
Ajax Question

How to use AJAX loading with Bootstrap tabs?

I used bootstrap-tabs.js and it has worked perfectly.

But I didn't find information about how to load content through AJAX request.

So, how to use AJAX loading with bootstrap-tabs.js?

Answer Source

You can listen the change event and ajax load content in the event handler

$('.tabs').bind('change', function (e) {
    var now_tab = // activated tab

    // get the div's id
    var divid = $(now_tab).attr('href').substr(1);

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download