jQuery Mobile Collapsible heading Option Last Updated : 17 Jan, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report jQuery Mobile is a web-based technology and great building UI interfaces for the webpages that can be used to make responsive content for websites that can be accessed on all types of smartphones, tablets, and desktops. In this article, we will be using the jQuery Mobile Collapsible heading option to get or set the header for the collapsible. The header will be the first immediate child element in the collapsible container that matches the provided selector. Syntax: The below syntax is used to initialize the collapsible with the heading option. $( ".selector" ).collapsible({ heading: ".mycollapsibleheading" }); Get the default option: var heading = $( ".selector" ) .collapsible( "option", "heading" ); Set the default option: $( ".selector" ).collapsible( "option", "heading", ".mycollapsibleheading" ); CDN Links: Add the following jQuery Mobile scripts that you will need in your project. <link rel="stylesheet" href="//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.css"> <script src="//code.jquery.com/jquery-3.2.1.min.js"></script> <script src="//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.js"></script> Example: This example demonstrates the jQuery Mobile Collapsible heading option. HTML <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="stylesheet" href= "//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.css"> <script src= "//code.jquery.com/jquery-3.2.1.min.js"></script> <script src= "//code.jquery.com/mobile/1.5.0-alpha.1/jquery.mobile-1.5.0-alpha.1.min.js"> </script> <script> $(function () { $("#btn").on('click', function () { var heading = $( "#divID" ).collapsible( "option", "heading" ); $("#gfg").html("Default Heading Option : " + heading); }); }); </script> </head> <body> <center> <div data-role="page" id="page1"> <div data-role="header"> <h1 style="color:green;">GeeksforGeeks</h1> <h3> jQuery Mobile Collapsible Heading Option </h3> </div> <div role="main" class="ui-content"> <div data-role="collapsible" id="divID"> <h3>GeeksforGeeks</h3> <p> GeeksforGeeks is a computer science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, quizzes etc. </p> </div> </div> <input type="button" id="btn" style="width:250px;" value="Heading"> <br> <h4><span id="gfg"></span></h4> </div> </center> </body> </html> Output: jQuery Mobile Popup tolerance option Reference: https://api.jquerymobile.com/collapsible/#option-heading Comment More infoAdvertise with us Next Article jQuery Mobile Collapsible Widget enhanced Option S SHUBHAMSINGH10 Follow Improve Article Tags : Web Technologies JQuery jQuery-Mobile jQuery-Mobile-Collapsible Similar Reads jQuery Mobile Collapsible mini Option jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be using the jQuery Mobile Collapsible widget mini option to set the size of the element to a more compact, mini version. It accepts the bo 1 min read jQuery Mobile Collapsible Widget expandedIcon Option jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. This article will be using the jQuery Mobile Collapsible Widget expandedIcon option to set the icon of header of the collapsible container when in an expanded state 1 min read jQuery Mobile Collapsible Widget enhanced Option jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. This article will be using the jQuery Mobile Collapsible Widget enhanced option to display the markup necessary for a collapsible widget that has been provided as p 1 min read jQuery Mobile Collapsible initSelector Option jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be using the jQuery Mobile Collapsible initSelector option. The value of this option is a selector string that picks elements on the basis 2 min read jQuery Mobile Collapsible Widget inset Option jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be using the jQuery Mobile Collapsible Widget inset option to set the option value to false, the element will get a full-width appearance w 1 min read jQuery Mobile Collapsible option() Method jQuery Mobile is a web-based technology that can be used to make responsive content for websites that can be accessed on all types of smartphones, tablets, and desktops. In this article, we are going to learn the jQuery Mobile Collapsible option() method. Using this method, we can get, set or update 3 min read Like