aboutsummaryrefslogtreecommitdiffstats
path: root/public/javascripts
diff options
context:
space:
mode:
authordjones <dgjones@gmail.com>2010-09-07 16:18:27 +1200
committerdjones <dgjones@gmail.com>2010-09-07 16:18:27 +1200
commit4450b5634545b6694dfc5f97898c0dbcc01ea77b (patch)
treea0acc7293a38d73157f4006c0bc7c394ae021c6a /public/javascripts
parent18a708984ce40b5053ee6db5ff337e4ea9df986b (diff)
downloadrefinerycms-blog-4450b5634545b6694dfc5f97898c0dbcc01ea77b.tar.gz
refinerycms-blog-4450b5634545b6694dfc5f97898c0dbcc01ea77b.tar.bz2
refinerycms-blog-4450b5634545b6694dfc5f97898c0dbcc01ea77b.zip
backport these changes from my client project into the gem
Diffstat (limited to 'public/javascripts')
-rw-r--r--public/javascripts/refinery/refinerycms-blog.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/public/javascripts/refinery/refinerycms-blog.js b/public/javascripts/refinery/refinerycms-blog.js
index fdbf392..3ddbcc2 100644
--- a/public/javascripts/refinery/refinerycms-blog.js
+++ b/public/javascripts/refinery/refinerycms-blog.js
@@ -15,15 +15,19 @@ $(document).ready(function(){
$('ul.collapsible_menu').each(function(i, ul) {
(first_li = $(this).children('li:first')).after(div=$("<div></div>"));
-
+
+ $("<span class='arrow'>&nbsp;</span>").appendTo(first_li)
+
if (($(this).children('li.selected')).length == 0) {
div.hide();
first_li.addClass("closed");
}
$(this).children('li:not(:first)').appendTo(div);
- first_li.find('> a').click(function(e){
- first_li.toggleClass("closed");
+ first_li.find('> a, > span.arrow').click(function(e){
+ $(this).parent().toggleClass("closed");
+ $(this).parent().toggleClass("open");
+
$(this).parent().next('div').animate({
opacity: 'toggle'
, height: 'toggle'