changeset 104:9825e51ba30f

Minor reorganization.
author Edho Arief <edho@myconan.net>
date Mon, 12 Nov 2012 11:29:22 +0700
parents a8768ad51926
children 28518004899a
files app/assets/javascripts/init.tabs.js
diffstat 1 files changed, 6 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/app/assets/javascripts/init.tabs.js	Mon Nov 12 11:28:11 2012 +0700
+++ b/app/assets/javascripts/init.tabs.js	Mon Nov 12 11:29:22 2012 +0700
@@ -1,9 +1,12 @@
 $(document).ready(function() {
   raw = $('#plain > pre').text();
-  $('#highlight > pre').text(raw);
-  $('#markdown > div').html(marked(raw));
+
+  $('#highlight pre').text(raw);
+  window.prettyPrint && prettyPrint();
+
+  $('#markdown div').html(marked(raw));
+
   mode = window.location.hash.substr(1);
   if (mode == 'highlight') { $('#paste-tabs li:eq(1) a').click(); }
   else if (mode == 'markdown') { $('#paste-tabs li:eq(2) a').click(); }
-  window.prettyPrint && prettyPrint();
 });