From: Ian Barton <lists@wilkesley.net>
To: emacs-orgmode@gnu.org
Subject: Re: Expandable sidebar
Date: Thu, 17 Nov 2011 14:43:32 +0000 [thread overview]
Message-ID: <4EC51D94.5000605@wilkesley.net> (raw)
In-Reply-To: <47519B07-8CEF-4F2B-8983-C655027DBA49@gmail.com>
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:
<!-- jQuery stuff. -->
<script
src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"
type="text/javascript"></script>
<script src="./files/js/show-hide.js" type="text/javascript"></script>
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.
prev parent reply other threads:[~2011-11-17 14:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-16 19:03 Expandable sidebar Aris Bezas
2011-11-17 14:43 ` Ian Barton [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4EC51D94.5000605@wilkesley.net \
--to=lists@wilkesley.net \
--cc=emacs-orgmode@gnu.org \
--cc=ian@manor-farm.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).