From 0b744bae5e8379531939942670d87b46bb9d0e1a Mon Sep 17 00:00:00 2001 From: B Mathis Date: Thu, 12 Nov 2009 10:28:30 -0600 Subject: improved javascript for code expansion --- source/javascripts/octopress.js | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'source/javascripts/octopress.js') 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 -- cgit v1.2.1