I am attemtping to use MixitUp with bootstrap tabs, now I have read a few things but it has not resolved the issue.
This also does not resolve the issue
I have been able to reproduce the issue in codepen with minimal code. http://codepen.io/anon/pen/aNWwZL
The issue is that when applying filters in different tabs, they stop working.
Repro:
- Apply filter in Tab 1
- Apply filter in Tab 2
- Try and apply filter in Tab 1 again
On the 3rd step the filters no longer work.
I've been trying to solve this for a few days now and I'm stuck. Here is some of the code that handles switching between tabs:
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var target = $(e.target).attr('href');
if (target === "#TvShowTab") {
if (!$('#tvList').mixItUp('isLoaded')) {
$('#tvList').mixItUp();
}
}
if (target === "#MoviesTab") {
if (!$('#movieList').mixItUp('isLoaded')) {
$('#movieList').mixItUp();
}
}
});