/*
* TABS
*/
- $('#tabs li').live('click', function(event, callback) {
+ $(document).on('click', '#tabs li', function(event, callback) {
event.preventDefault();
$.wiki.switchToTab(this);
});
- $('#tabs li > .tabclose').live('click', function(event, callback) {
+ $(document).on('click', '#tabs li > .tabclose', function(event, callback) {
var $tab = $(this).parent();
if($tab.is('.active'))
/* Load configuration */
$.wiki.loadConfig();
- var initAll = function(a, f) {
- if (a.length == 0) return f();
-
- $.wiki.initTab({
- tab: a.pop(),
- doc: CurrentDocument,
- callback: function(){
- initAll(a, f);
- }
- });
- };
-
-
- /*
- * Initialize all perspectives
- */
- initAll( $.makeArray($('ol#tabs li')), initialize);
- console.log(location.hash);
-});
\ No newline at end of file
+ $('.tabs li').each((i, e) => {
+ $.wiki.initTab({tab: e, doc: CurrentDocument});
+ });
+ initialize();
+});