From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Re: Expandable sidebar Date: Thu, 17 Nov 2011 14:43:32 +0000 Message-ID: <4EC51D94.5000605@wilkesley.net> References: <47519B07-8CEF-4F2B-8983-C655027DBA49@gmail.com> Reply-To: ian@manor-farm.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([140.186.70.92]:60464) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR3CR-0008Eu-04 for emacs-orgmode@gnu.org; Thu, 17 Nov 2011 09:44:24 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RR3CP-0005fO-KR for emacs-orgmode@gnu.org; Thu, 17 Nov 2011 09:44:22 -0500 Received: from mail.ian-barton.com ([109.74.196.44]:42160 helo=li40-130.members.linode.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RR3CP-0005cR-G4 for emacs-orgmode@gnu.org; Thu, 17 Nov 2011 09:44:21 -0500 Received: from [192.168.0.133] (unknown [217.146.125.41]) (Authenticated sender: lists@wilkesley.net) by li40-130.members.linode.com (Postfix) with ESMTPSA id CBF6726B4B6 for ; Thu, 17 Nov 2011 14:43:54 +0000 (GMT) In-Reply-To: <47519B07-8CEF-4F2B-8983-C655027DBA49@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org On 16/11/11 19:03, Aris Bezas wrote: > Hi there, > > I am building an academical site with orgmode-emacs (http://earlab.org/). > I want to implement an expandable sidebar but a have a problem to do it. > I am sending the files of my implementation -> > http://igoumeninja.org/org/index.html > You can do this using jQuery. In the head section of your html you need: The show-hide.js looks like: $(document).ready(function() { $('div.outline-3> div').hide(); $('div.outline-3> h3').click(function() { $(this).siblings('div').toggle(); return false; }).siblings('div').hide(); This will hide any headers under the div with class=div.outline-3. If you click on a header with this class visibility of all it's sub-headings wil be toggled. You might also want to have a look at the TableOfContents Plugin for jQuery by Doug Neiner, which will auto generate a TOC for you. Ian.