# Show Hide Macro

Изменил последним Helge Dahl 2018/01/22 10:41

#### Экспорт

#### Office Formats

Экспорт в PDF Экспорт в ODT Экспорт в RTF

#### Other Formats

Экспорт в HTML

Wiki macros implementation for simple show/hide of a content with some animations.
This version 2.0 is HTML compatible with the old version, so that existing project could continue styling
with the same kind of CSS rules. However, it is now based on jQuery, and need requireJS, so it requires
XWiki 5.x or more.

Using id="..." is still supported and provide the same HTML result but it is no more needed to achieve a working animation.

## Without effect

Show

Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible

{{showhide showmessage="Show" hidemessage="Hide" style="background-color: #ccc"}}
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
{{/showhide}}

## With a fade in effect

Show

Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible

{{showhide showmessage="Show" hidemessage="Hide" effect="fade" effectduration="2" style="background-color: #ccc"}}
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
{{/showhide}}
Using effect="appear" is still supported and provide the same behavior

## With a sliding down effect

Show

Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible

{{showhide showmessage="Show" hidemessage="Hide" effect="slide" effectduration="0.5" style="background-color: #ccc"}}
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
Here is some hidden content that can become visible
{{/showhide}}
This effect is equivalent to effect="blind" in the 1.0 macro, so both slide and blind effect are now using the exact same animation.
Тэги:
Создал Helge Dahl 2011/05/12 11:14

- Комментарии (0)
- Вложенные файлы (0)
- Информация

# Приложения

# Tips

If you're starting with XWiki, check out the Getting Started Guide.

# Need help?

If you need help with XWiki you can contact:

- Community Support
- Professional Support