diff options
author | B Mathis <brandon@imathis.com> | 2009-11-12 10:28:30 -0600 |
---|---|---|
committer | B Mathis <brandon@imathis.com> | 2009-11-12 10:28:30 -0600 |
commit | 0b744bae5e8379531939942670d87b46bb9d0e1a (patch) | |
tree | 6007e196de26798248d1df42cd9651b495f63336 /source/javascripts/octopress.js | |
parent | 1eddd60a716accb9252600202b79f25a7ceda904 (diff) | |
download | my_new_personal_website-0b744bae5e8379531939942670d87b46bb9d0e1a.tar.xz my_new_personal_website-0b744bae5e8379531939942670d87b46bb9d0e1a.zip |
improved javascript for code expansion
Diffstat (limited to '')
-rw-r--r-- | source/javascripts/octopress.js | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/source/javascripts/octopress.js b/source/javascripts/octopress.js index 300d9c6a..a91d30e8 100644 --- a/source/javascripts/octopress.js +++ b/source/javascripts/octopress.js @@ -1,12 +1,7 @@ window.addEvent('domready', function() { - addPreExpanders(); + $$('div.highlight').each(addExpander); }); -function addPreExpanders(){ - $$('div.highlight').each(function(div){ - addExpander(div); - }); -} function addExpander(div){ new Element('span',{ html: 'expand »', @@ -29,6 +24,6 @@ function toggleExpander(){ html = 'expand »'; } $$('div.highlight span.pre_expander').each(function(span){ - span.set('html',html); + span.set('html',html); }); }
\ No newline at end of file |