diff options
Diffstat (limited to 'public')
-rw-r--r-- | public/javascripts/refinery/refinerycms-blog.js | 10 | ||||
-rw-r--r-- | public/stylesheets/refinery/refinerycms-blog.css | 22 |
2 files changed, 24 insertions, 8 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'> </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' diff --git a/public/stylesheets/refinery/refinerycms-blog.css b/public/stylesheets/refinery/refinerycms-blog.css index bede6ce..ff6a934 100644 --- a/public/stylesheets/refinery/refinerycms-blog.css +++ b/public/stylesheets/refinery/refinerycms-blog.css @@ -31,9 +31,21 @@ .page_add_icon { background-image: url('/images/refinerycms-blog/icons/page_add.png'); } -.collapsible_menu li:first { - background-image: url('/images/refinerycms-blog/icons/up.png'); -} -.collapsible_menu li.closed { - background-image: url('/images/refinerycms-blog/icons/down.png'); +ul.collapsible_menu li { + position: relative; +} +ul.collapsible_menu li span.arrow { + background-repeat: no-repeat; + position: absolute; + right: 10px; + top: 13px; + width: 11px; + height: 7px; + cursor: pointer; +} +ul.collapsible_menu li span.arrow { + background-image: url('/images/refinerycms-blog/icons/up.gif'); +} +ul.collapsible_menu li.closed span.arrow { + background-image: url('/images/refinerycms-blog/icons/down.gif'); }
\ No newline at end of file |