From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Barton Subject: Some Javascript Adventures Date: Tue, 12 May 2009 12:42:54 +0100 Message-ID: <4A0960BE.2050005@manor-farm.org> Reply-To: lists@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 mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1M3qO0-0001iH-9W for emacs-orgmode@gnu.org; Tue, 12 May 2009 07:43:04 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1M3qNy-0001hL-4T for emacs-orgmode@gnu.org; Tue, 12 May 2009 07:43:03 -0400 Received: from [199.232.76.173] (port=44186 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1M3qNx-0001hC-Tw for emacs-orgmode@gnu.org; Tue, 12 May 2009 07:43:01 -0400 Received: from li40-130.members.linode.com ([72.14.178.130]:48819) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1M3qNx-0003rL-Fo for emacs-orgmode@gnu.org; Tue, 12 May 2009 07:43:01 -0400 Received: from localhost (mail.wilkesley.org [127.0.0.1]) by li40-130.members.linode.com (Postfix) with ESMTP id 944FECD6A for ; Tue, 12 May 2009 12:42:58 +0100 (BST) Received: from li40-130.members.linode.com ([127.0.0.1]) by localhost (wilkesley.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wmBiBQKDIvTs for ; Tue, 12 May 2009 12:42:57 +0100 (BST) Received: from [192.168.0.55] (unknown [217.146.125.41]) by li40-130.members.linode.com (Postfix) with ESMTPSA id 49463CD63 for ; Tue, 12 May 2009 12:42:56 +0100 (BST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Yesterday on my bike ride I was listening to an old FLOSS Podcast about jQuery. There are a few things that Sebastian's org-info-js doesn't do, that I would like. Unfortunately, my knowledge of javascript is almost zero. However, the jQuery library seems to have excellent documentation. More importantly using jQuery seems to mostly protect you from trying to debug your code on lots of different browsers, since the jQuery author has already done it for you. After some experiments I cam up with the following snippets which toggle the visibility of DONE tasks and also timestamps. Hope someone finds them useful! Ian. You can set up a buttons to call these functions: