LinkButton

Override defaults with $.fn.linkbutton.defaults.

The linkbutton is used to create a hyperlink button. It is a representation of a normal <a> tag. It can display both an icon and text, or only the icon or text. The button width can dynamic and shrink/expand to fit its text labels.

Usage Example

Create linkbutton

Create a linkbutton from markup is more easily.

Create a linkbutton programmatically is also allowed.

Process clicking on linkbutton.

Clicking on linkbutton will send the user to other page.

The example below will alert a message.

Bind click handler using jQuery.

Properties

Name Type Description Default
width number The width of this component. null
height number The height of this component. null
id string The id attribute of this component. null
disabled boolean True to disable the button false
toggle boolean True to enable the user to switch its state to selected or unselected. Available since version 1.3.3. false
selected boolean Defines if the button's state is selected. Available since version 1.3.3. false
group string The group name that indicates what buttons belong to. Available since version 1.3.3. null
plain boolean True to show a plain effect. false
text string The button text. ''
iconCls string A CSS class to display a 16x16 icon on left. null
iconAlign string Position of the button icon. Possible values are: 'left','right','top','bottom'. Available since version 1.3.2. left
size string The button size. Possible values are: 'small','large'. Available since version 1.3.6. small

Events

Name Parameters Description
onClick none Fires when click the button. Available since version 1.3.6.

Methods

Name Parameter Description
options none Return options property.
resize param Resize the button. Available since version 1.4.

Code example:

$('#btn').linkbutton('resize', {
	width: '100%',
	height: 32
});
disable none Disable the button.

Code example:

$('#btn').linkbutton('disable');
enable none Enable the button.

Code example:

$('#btn').linkbutton('enable');
select none Select the button. Available since version 1.3.3.
unselect none Unselect the button. Available since version 1.3.3.
?