$('#default').puibutton();
<button id="default" type="button">Default</button>
Name | Type | Default | Description |
---|---|---|---|
icon | string | null | Defines the icon of the button. |
iconPos | string | left | Position of the icon, valid values are "left" and "right". |
Name | Parameters | Description |
---|---|---|
click | event: Event instance. | Fired when the button is clicked. |
$('#default').puibutton({ click: function(event) { //... } });
Name | Parameters | Description |
---|---|---|
disable | - | Disables the button. |
enable | - | Enables the button. |
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').puibutton('disable');
$('#default').puibutton(); $('#left').puibutton({ icon: 'fa-check' }); $('#right').puibutton({ icon: 'fa-close' , iconPos: 'right' }); $('#icononly').puibutton({ icon: 'fa-save' }); $('#disabled').puibutton();
<button id="default" type="button">Default</button> <button id="left" type="button">Left Icon</button> <button id="right" type="button">Right Icon</button> <button id="icononly" type="button"></button> <button id="disabled" type="button" disabled="disabled">Disabled</button> <button is="p-button" icon="fa-home">PrimeElement</button>
<button is="p-button" icon="fa-home">PrimeElement</button>
As p-button is an extension, all attributes of standard button element is available. Additional attributes are listed below.
Name | Type | Default | Description |
---|---|---|---|
icon | string | null | Defines the icon of the button. |
iconPos | string | left | Position of the icon, valid values are "left" and "right". |