$('#default').puipanel();
<div id="default" title="Header"> Content </div>
Name | Type | Default | Description |
---|---|---|---|
toggleable | Boolean | false | Defines if content of panel can be expanded and collapsed. |
toggleDuration | Number/String | normal | Defines the duration of the toggle effect, valid values are "slow", "normal", "fast" or a number in milliseconds. |
toggleOrientation | String | vertical | Defines orientation of toggle direction, valid values are "vertical" and "horizontal". |
collapsed | Boolean | false | Displays the panel as collapsed initially. |
closable | Boolean | false | Defines if content of panel can be hidden using close option. |
closeDuration | Number/String | normal | Defines the duration of the close effect, valid values are "slow", "normal", "fast" or a number in milliseconds. |
Name | Parameters | Description |
---|---|---|
beforeToggle | event: puipanelbeforeToggle event | Fired before toggling. |
afterToggle | event: puipanelsetafterToggle event | Fired after toggling. |
beforeClose | event: puipanelbeforeClose event | Fired before closing. |
afterClose | event: puipanelafterClose event | Fired after closing. |
$('#default').puipanel({ afterToggle: function(event) { //... } });
Name | Parameters | Description |
---|---|---|
toggle | - | Toggles content. |
expand | - | Expands content. |
collapse | - | Collapses content. |
close | - | Hides panel. |
option | name: Name of the option | Returns the value of the option. |
option | name: Name of the option, value: Value of the option | Set the value of the option. |
$('#default').puipanel('toggle');
$(function() { $('#default').puipanel(); $('#options').puipanel({ toggleable: true ,closable: true }); });
<div id="default" style="margin-bottom:20px" title="Default"> The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family. </div> <div id="options" style="margin-bottom:20px" title="Toggle and Close"> The story begins as Don Vito Corleone, the head of a New York Mafia family, oversees his daughter's wedding. His beloved son Michael has just come home from the war, but does not intend to become part of his father's business. Through Michael's life the nature of the family business becomes clear. The business of the family is just like the head of the family, kind and benevolent to those who give respect, but given to ruthless violence whenever anything stands against the good of the family. </div>