assaqqaf assaqqaf - 6 months ago 41
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?


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);