aboutsummaryrefslogtreecommitdiff
path: root/source/javascripts/octopress.js
diff options
context:
space:
mode:
authorB Mathis <brandon@imathis.com>2009-11-12 10:28:30 -0600
committerB Mathis <brandon@imathis.com>2009-11-12 10:28:30 -0600
commit0b744bae5e8379531939942670d87b46bb9d0e1a (patch)
tree6007e196de26798248d1df42cd9651b495f63336 /source/javascripts/octopress.js
parent1eddd60a716accb9252600202b79f25a7ceda904 (diff)
downloadmy_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.js9
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 &raquo;',
@@ -29,6 +24,6 @@ function toggleExpander(){
html = 'expand &raquo;';
}
$$('div.highlight span.pre_expander').each(function(span){
- span.set('html',html);
+ span.set('html',html);
});
} \ No newline at end of file