[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Orgmode] Some Javascript Adventures
From: |
Sebastian Rose |
Subject: |
Re: [Orgmode] Some Javascript Adventures |
Date: |
Wed, 13 May 2009 15:57:58 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.92 (gnu/linux) |
> => --->8----------------------------->8----------------------------->8---
> #+STYLE: <script type="text/javascript" src="jquery-1.3.2.min.js"></script>
> #+STYLE: <script type="text/javascript">
> #+STYLE: <!--/*--><![CDATA[/*><!--*/
> #+STYLE: $(document).ready(
> #+STYLE: function(){
> #+STYLE: $("#text-1 ul").eq(0).find("li").each(
> #+STYLE: function(){if($(this).children().eq(0)){
> #+STYLE: $(this).css({cursor: "pointer"});
> #+STYLE: $(this).bind(
> #+STYLE: "click",
> #+STYLE: function(){
> #+STYLE: if($(this).children().eq(0).is(":visible"))
> $(this).children().eq(0).slideUp(250);
> #+STYLE: else $(this).children().eq(0).slideDown(250);
> #+STYLE: return false;});}});
Add this line here:
#+STYLE: $("#text-1 ul").eq(0).find("a").bind("click",
function(){document.location.href=$(this).attr('href');return false;});
> #+STYLE: $("#text-1 ul").eq(0).find("ul").hide();
> #+STYLE: });
> #+STYLE: /*]]>*///-->
> #+STYLE: </script>
>
>
> * Sitemap
> #+INCLUDE sitemap.org
>
> <= ---8<-----------------------------8<-----------------------------8<---
>
Unfortunately, it's tricky to get jQuery to work in Opera together with
org-info.js (org-info.js works, jQuery doesn't :) ).
Even in Firefox, if you place the jQuery stuff below the org-info.js
stuff, it stops working.
We should realy create a jQuery version of org-info.js...
Sebastian