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 load
There is an error in your code user1177811.
It has to be $('[data-toggle="tabajax"]')
.
Also there is room for improvement. The .load() method, unlike $.get(), allows us to specify a portion of the remote document to be inserted. So i added #content
to load the content div of the remote page.
$this.tab('show');
is now only called, when response was a success.
Here is the code
$('[data-toggle="tabajax"]').click(function(e) {
e.preventDefault();
$this = $(this);
var loadurl = $(this).attr('href');
var targ = $(this).attr('data-target');
$(targ).load(loadurl+'?ajax=true #content', function(){
$this.tab('show');
});
});