Wijmo User Guide > Widgets > Expander > Markup and Scripting |
Markup for a wijexpander looks like this:
Sample Markup |
Copy Code
|
---|---|
<div id="expander"> <div> header </div> <div> content </div> </div> |
Sample Markup |
Copy Code
|
---|---|
<div id="expander"> <h1> header </h1> <div> content </div> </div> |
You can initialize the wijexpander with code like the following:
Sample Script |
Copy Code
|
---|---|
<script id="scriptInit" type="text/javascript"> $('#expander').wijexpander ({expanded: false }); </script> |
When you view the project in a browser, it will be unexpanded by default and look like this:
Click the above expander's header to expand the widget and view the content area.