📅  最后修改于: 2023-12-03 15:16:56.958000             🧑  作者: Mango
The toggleMode
property of jQWidgets jqxTabs specifies whether to allow toggling of tabs on click or not.
$('#jqxTabs').jqxTabs({
toggleMode: <Boolean>
});
toggleMode
- A Boolean value indicating whether to allow toggling of tabs on click. Default value is true
.When the toggleMode
property is set to true
, clicking on an active tab will toggle it off, disabling its contents. This behavior is useful when you want to allow users to easily remove tabs they no longer need.
$('#jqxTabs').jqxTabs({
toggleMode: true
});
In the above example, the toggleMode
property is set to true
, allowing toggling of tabs on click.
If toggleMode
is set to false
, clicking on an active tab will have no effect.
If toggleMode
is set to true
, the select
event will be triggered twice when a tab is clicked: once when the tab is deselected, and once when the tab is selected again.
Toggling of tabs on click is only supported for non-collapsible tabs.
The toggleMode
property of jQWidgets jqxTabs is a useful feature that allows users to easily toggle off tabs they no longer need. By setting it to true
, you can enable this behavior and give more control to your users.