📜  jQWidgets jqxRibbon mode 属性(1)

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

jQWidgets jqxRibbon mode Property

The mode property of the jQWidgets jqxRibbon is used to specify the behavior of the ribbon control. The possible values for the mode property are default and popup.

The default mode is used to display the ribbon control along with the rest of the content on the page. In this mode, the ribbon behaves like a standard navigation bar, allowing users to quickly access different areas of the application.

The popup mode is used to display the ribbon control as a floating element that can be displayed at any time. In this mode, the ribbon can be used to display additional information or options without taking up valuable screen real estate.

Syntax

The syntax for the mode property is as follows:

$('#jqxRibbon').jqxRibbon({ mode: 'default' });
Example

The following example demonstrates how to set the mode property of the jQWidgets jqxRibbon:

<!DOCTYPE html>
<html>
<head>
    <title>jQWidgets jqxRibbon - Mode Property</title>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqxwidgets/5.5.2/jqxcore.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jqxwidgets/5.5.2/jqxribbon.js"></script>
</head>
<body>
    <div id="jqxRibbon">
        <ul>
            <li>File</li>
            <li>Edit</li>
            <li>View</li>
        </ul>
    </div>
    <script>
        $(document).ready(function () {
            $('#jqxRibbon').jqxRibbon({
                mode: 'default'
            });
        });
    </script>
</body>
</html>

In this example, the jQWidgets jqxRibbon is displayed with the default mode. To use the popup mode, simply change the value of the mode property to popup.