From 4450b5634545b6694dfc5f97898c0dbcc01ea77b Mon Sep 17 00:00:00 2001 From: djones Date: Tue, 7 Sep 2010 16:18:27 +1200 Subject: backport these changes from my client project into the gem --- public/javascripts/refinery/refinerycms-blog.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'public/javascripts/refinery/refinerycms-blog.js') 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=$("
")); - + + $(" ").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' -- cgit v1.2.3