Hi Wouter,
mmm I think you need to use the {{html}} macro instead of {{script}}
And - if you plan to switch multiple boxes individually you should
replace occurrences of "DIV ID" with "idOfBox1" e.t.c.
or you might do it with inline styles and groups so you can avoid
cluttering your page with html:
(% id="woutersId" class="hidden" %)(((
Another box that gets hidden when clicked below
)))
(% onclick="toggleClass($('woutersId'), 'hidden')" %)(((
[[Show/Hide the other box>>#]]
)))
have fun
Andreas
Am 08.04.2011 17:04, schrieb Wouter de Vos:
Exactly!
Just what I need, but I dont get it to work, I (still) run V. 2.4.3,
here is what I did:
{{script language="java"}}
<div id="DIV ID" class="hidden">
This Box will be hidden if you click on the box below !
</div>
<div onclick="toggleClass($('DIV ID'), 'hidden')">
Show/Hide the box!
</div>
{{/script}}
Then I get the message failed to execute the script macro.
I am probabely missing the obvious, but dont know what...If I leave the
{{script language="java"}}
{{/script}}
tags away, it only generates Text.
How do I get it to work?
Any help is greatly appreciated.
Wouter
On 4/8/11, Guillaume Lerouge<guillaume(a)xwiki.com> wrote:
Like
http://extensions.xwiki.org/xwiki/bin/view/Extension/Show+Hide+DIV ?
Guillaume
On Fri, Apr 8, 2011 at 15:50, Wouter de Vos<hukabuka(a)googlemail.com>
wrote:
Hi All,
I am looking for a way (probably a Macro) that allows me to show and
hide text content within an existing page by clicking on a specified
word.
Similiar to error codes where you click on the error code and you get
more information.
I need this so I can put alot of information in one page, and my users
can choose which information they want to have expanded.
A bit like show-hide table of contents in the 1.X versions.
I hope someone can help me out,
Thanks in advance,
Wouter
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
users(a)xwiki.org