Merge branch 'master' of ssh://git.onelab.eu/git/myslice
[myslice.git] / plugins / tabs / static / js / tabs.js
index bc39890..64c6921 100644 (file)
@@ -2,10 +2,11 @@
 
     $.fn.Tabs = function( method ) {
 
-        $('a[data-toggle="tab"]').on('shown', function (e) {
-          google.maps.event.trigger(map, 'resize');
-          //e.target // current tab
-          //e.relatedTarget // previous tab
+        // In Bootstrap 3, we need shown.bs.tab instrad of shown.
+        // see: http://bootply.com/bootstrap-3-migration-guide
+        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
+          // find the plugin object inside the tab content referenced by the current tabs
+          $('.plugin', $($(e.target).attr('href'))).trigger('show');
         });
 
     };