comparison app/assets/javascripts/init.tabs.js @ 111:a92e732a2caa

Correct way to switch tab.
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 12:35:33 +0700
parents e8c632b0eb80
children 2b1041e8c35e
comparison
equal deleted inserted replaced
110:e8c632b0eb80 111:a92e732a2caa
6 window.prettyPrint && prettyPrint(); 6 window.prettyPrint && prettyPrint();
7 7
8 $('#markdown div').html(marked(raw)); 8 $('#markdown div').html(marked(raw));
9 9
10 mode = window.location.hash.substr(1); 10 mode = window.location.hash.substr(1);
11 if (mode == 'highlight') { $('#paste-tabs li:eq(1) a').click(); } 11 if (mode == 'highlight') { $('#paste-tabs li:eq(1) a').tab('show'); }
12 else if (mode == 'markdown') { $('#paste-tabs li:eq(2) a').click(); } 12 else if (mode == 'markdown') { $('#paste-tabs li:eq(2) a').tab('show'); }
13 13
14 $('#tab-resize ul a').click(function() { 14 $('#tab-resize ul a').click(function() {
15 var size = $(this).data('size'), 15 var size = $(this).data('size'),
16 paste = $('#paste'), 16 paste = $('#paste'),
17 title = $('#tab-resize a.btn'); 17 title = $('#tab-resize a.btn');