Making a jQuery Isotope layout initialize inside a Bootstrap Tab -
i have bootstrap tab control 4 tabs. isotope code inside 3rd tab. when navigate tab, layout not engaged (all images on own line, not in nice tiled layout). if resize page reorganize proper layout.
i have recreated issue here. http://jsfiddle.net/vc6vk/
<div class="tab-pane" id="messages"> ....isotope code here </div>
how make isotope engage when navigate tab, formatted , displaying correctly?
you can use event shown.bs.tab :
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { $container.isotope('layout'); });
this code trigger layout
tabs, can detect tab e.target, if e.target == tab link isotope grid, trigger layout
. hope makes sense...
Comments
Post a Comment