📜  jQWidgets jqxTabs toggleMode 属性(1)

📅  最后修改于: 2023-12-03 15:16:56.958000             🧑  作者: Mango

jQWidgets jqxTabs toggleMode 属性

The toggleMode property of jQWidgets jqxTabs specifies whether to allow toggling of tabs on click or not.

Syntax
$('#jqxTabs').jqxTabs({
    toggleMode: <Boolean>
});
Parameters
  • toggleMode - A Boolean value indicating whether to allow toggling of tabs on click. Default value is true.
Description

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.

Example
$('#jqxTabs').jqxTabs({
    toggleMode: true
});

In the above example, the toggleMode property is set to true, allowing toggling of tabs on click.

Remarks
  • 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.

Conclusion

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.