The tab system works fine but I want the tab to update every time I click to open it. I mean, if I edit the div it will update the message.
Without refreshing the whole page!
Anyone know how?
I tried with this:
$('#menu .item')
.tab({
history: true,
cache: false,
apiSettings: {
loadingDuration: 300,
mockResponse: function(settings) {
var response = {
first: 'AJAX Tab One',
second: 'AJAX Tab Two',
third: 'AJAX Tab Three'
};
return response[settings.urlData.tab];
}
},
auto: true
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
</div>
Sorry this is a little late, but I think you're looking for the alwaysRefresh
tab setting mentioned here. The default value is false, but setting it to true should reload the tab's content every time:
$('#menu .item')
.tab({
alwaysRefresh: true,
history: true,
cache: false,
apiSettings: {
loadingDuration: 300,
mockResponse: function(settings) {
var response = {
first: 'AJAX Tab One',
second: 'AJAX Tab Two',
third: 'AJAX Tab Three'
};
return response[settings.urlData.tab];
}
},
auto: true
});