fix up the animations. seems to be related to the data-bound attribute causing the animtions not to fire on each .mix object.

This commit is contained in:
Drewster727 2016-03-27 19:33:22 -05:00
commit bee4d2dc4c

View file

@ -17,6 +17,11 @@ var mixItUpDefault = {
}, },
layout: { layout: {
display: 'block' display: 'block'
},
callbacks: {
onMixStart: function (state, futureState) {
$('.mix', this).removeAttr('data-bound').removeData('bound'); // fix for animation issues in other tabs
}
} }
}; };
@ -29,7 +34,7 @@ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
var $ml = $('#movieList'); var $ml = $('#movieList');
var $tvl = $('#tvList'); var $tvl = $('#tvList');
$('.approve-category').hide(); $('.approve-category').hide();
if (target === "#TvShowTab") { if (target === "#TvShowTab") {
$('#approveTVShows').show(); $('#approveTVShows').show();
@ -49,6 +54,7 @@ $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
if ($ml.mixItUp('isLoaded')) $ml.mixItUp('destroy'); if ($ml.mixItUp('isLoaded')) $ml.mixItUp('destroy');
$ml.mixItUp(mixItUpConfig(activeState)); // init or reinit $ml.mixItUp(mixItUpConfig(activeState)); // init or reinit
} }
//$('.mix[data-bound]').removeAttr('data-bound');
}); });
// Approve all // Approve all