Skip to content
Related Articles

Related Articles

jQWidgets jqxNavigationBar expandingItem Event

View Discussion
Improve Article
Save Article
  • Last Updated : 28 Oct, 2021

jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful, optimized, platform-independent, and widely supported framework. The jqxNavigationBar is used for representing a jQuery widget that has header and content sections. On clicking over the header, the content will be expanded or collapsed accordingly.

The expandingItem event is triggered when an item of the specified jqxNavigationBar is going to be expanded.


$('Selector').on('expandingItem', function (event) {
    var expandingItem = event.args.item;

Linked Files: Download jQWidgets from the given link. In the HTML file, locate the script files in the downloaded folder.

<link rel=”stylesheet” href=”jqwidgets/styles/jqx.base.css” type=”text/css” />
<script type=”text/javascript” src=”scripts/jquery.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxcore.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxexpander.js”></script>
<script type=”text/javascript” src=”jqwidgets/jqxnavigationbar.js”></script>

Example: The below example illustrates the jQWidgets jqxNavigationBar expandingItem event.


<!DOCTYPE html>
<html lang="en">
    <link rel="stylesheet" 
          href= "jqwidgets/styles/jqx.base.css" 
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript" 
    <script type="text/javascript" 
        <h1 style="color: green;">
            jQWidgets jqxNavigationBar expandingItem Event
        <div id="jqx_Navigation_Bar" style="margin:25px;" 
            <div>First Header</div>
                <h8>Content for the first header</h8>
            <div> Second Header</div>
                <h8>Content for the second header</h8>
        <div id="log"></div>
        <script type="text/javascript">
            $(document).ready(function () {
                        width: 250,
                        height: 132
                    on('expandingItem', function (event) {
                        var Expanding_Item = event.args.item;
                         "The index of the expanding item is: "
                            + Expanding_Item))



My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!