[xwiki-users] Show-Hide Text Content
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
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@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@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
On Fri, Apr 8, 2011 at 16:28, Guillaume Lerouge <guillaume@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@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@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
-- Guillaume Lerouge Sales - XWiki SAS Skype: wikibc Office: +33 1 45 42 40 90 Mobile: +33 6 10 79 76 70 -- Join our webinars to discover our solutions: http://www.xwiki.com/xwiki/bin/view/Resources/Webinars
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@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@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@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
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@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@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@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Thanks Andreas! It works perfectly, and looks awesome, thanks a lot for your advice and help! -Wouter On 4/8/11, Andreas Hahn <ahahn@gmx.net> wrote:
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@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@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@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
participants (3)
-
Andreas Hahn -
Guillaume Lerouge -
Wouter de Vos