From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rick Frankel Subject: [BUG] worg table of contents Date: Wed, 15 May 2013 13:53:55 -0400 Message-ID: <282e3e6c4effd2077b1af34748f6662a@mail.rickster.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:53227) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucftm-0001St-Am for emacs-orgmode@gnu.org; Wed, 15 May 2013 13:54:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ucftj-0008Im-VL for emacs-orgmode@gnu.org; Wed, 15 May 2013 13:53:58 -0400 Received: from [204.62.15.78] (port=41193 helo=mail.rickster.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ucftj-0008IW-Ru for emacs-orgmode@gnu.org; Wed, 15 May 2013 13:53:55 -0400 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 The table of contents on worg is shown/hidden using the :hover pseudo-element on the #table-of-contents element. The problem is that this doesn't work on an ipad (or other touch device). The following javascript snippet will add a function to show the toc when it is "clicked", but I'm not sure where to put it (at the bottom of "preamble.html"?) #+BEGIN_SRC javascript document.addEventListener('DOMContentLoaded',function() { document.getElementById("table-of-contents").onclick = function() { var elem = document.getElementById("text-table-of-contents"); elem.style.display = elem.style.display == "block" ? "none" : "block"; } }); #+END_SRC rick