jQWidgets jqxTabs val() Method Last Updated : 08 Sep, 2021 Comments Improve Suggest changes Like Article Like Report jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful and optimized framework, platform-independent, and widely supported. The jqxTabs represents a jQuery Tab widget that is used for breaking the content into multiple sections. The <li> elements are used for tab title and <div> elements are used for tab content. The val() method is used to set or return the index number of the selected tab. It accepts a single parameter value of String type and it returns the String value. Syntax: Set the selected tab index. $("Selector").jqxTabs('val', 2); // or $("Selector").val(2); Return the selected tab's index. var value = $("Selector").jqxTabs('val'); // or var value = $("Selector").val(); Linked Files: Download jQWidgets from the given link https://www.jqwidgets.com/download/. In the HTML file, locate the script files in the downloaded folder. <link rel="stylesheet" href="jqwidgets/styles/jqx.base.css" type="text/css" /> <link rel="stylesheet" href="jqwidgets/styles/jqx.energyblue.css" type="text/css" /> <script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="jqwidgets/jqx-all.js"></script> <script type="text/javascript" src="jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="jqwidgets/jqxtabs.js"></script> The below example illustrates the jQWidgets jqxTabs val() method. Example: HTML <!DOCTYPE html> <html lang="en"> <head> <link rel="stylesheet" href= "jqwidgets/styles/jqx.base.css" type="text/css" /> <link rel="stylesheet" href=" jqwidgets/styles/jqx.energyblue.css" type="text/css" /> <script type="text/javascript" src="scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="jqwidgets/jqx-all.js"></script> <script type="text/javascript" src="jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="jqwidgets/jqxtabs.js"></script> </head> <body> <center> <h1 style="color: green;"> GeeksforGeeks </h1> <h3> jQWidgets jqxTabs val() Method </h3> <div id='jqxTabs'> <ul style='margin-left: 20px;'> <li>GeeksforGeeks</li> <li>HTML</li> <li>CSS</li> <li>JavaScript</li> </ul> <div> A Computer Science portal for geeks. It contains well written, well thought and well explained computer science and programming articles, ... </div> <div> HTML stands for HyperText Markup Language. It is used to design web pages using a markup language. HTML is the combination of Hypertext and Markup language. Hypertext defines the link between the web pages. </div> <div> Cascading Style Sheets, fondly referred to as CSS, is a simply designed language intended to simplify the process of making web pages presentable. CSS allows you to apply styles to web pages. More importantly, CSS enables you to do this independent of the HTML that makes up each web page. </div> <div> JavaScript is a lightweight, cross-platform, and interpreted scripting language. It is well-known for the development of web pages, many non-browser environments also use it. JavaScript can be used for Client-side developments as well as Server-side developments. </div> </div> <br> <input id="jqxBtn" type="button" value="Display Tab Index" style="padding: 5px 15px;"> </center> <script type="text/javascript"> $(document).ready(function() { $('#jqxTabs').jqxTabs({ theme: 'energyblue', width: 550, height: 150 }); $('#jqxBtn').click(function () { var val = $('#jqxTabs').jqxTabs('val'); alert("Tab Index Value: " + val) }); }); </script> </body> </html> Output: Reference: https://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxtabs/jquery-tabs-api.htm Comment More infoAdvertise with us Next Article jQWidgets jqxTabs val() Method A ashokjaiswal Follow Improve Article Tags : Web Technologies JQuery jQuery-jQWidgets jQWidgets-jqxTabs Similar Reads jQWidgets jqxTree val() Method 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 jqxTree represents a jQuery widget that is used to display a hierarchical collection of items. To display the c 2 min read jQWidgets jqxKnob val() Method 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 jqxKnob is used for representing a jQuery plugin having a round shape and displaying a draggable indicator with 2 min read jQWidgets jqxInput val() Method 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 jqxInput is used to represent a jQuery input widget that contains auto-complete features The val() method is us 2 min read jQWidgets jqxListBox val() Method Introduction: 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 jqxListBox is used to illustrate a jQuery ListBox widget which comprises a list of electable elem 2 min read jQWidgets jqxTextArea val() Method jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful and optimized framework, platform-independent, and widely supported. The jqxTextArea represents a jQuery textarea widget that is used to insert text content inside the textbox. The 2 min read jQWidgets jqxButton val() Method 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 jqxButton is used to illustrate a jQuery button widget that enables us to show a button on the desired web page 2 min read jQWidgets jqxForm val() Method jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is very powerful, optimized, platform-independent, and widely supported. The jqxForm represents a jQuery form widget that contains textFields, textArea and password fields, etc which helps us to store 2 min read jQWidgets jqxRibbon val() Method jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful and optimized framework, platform-independent, and widely supported. The jqxRibbon is a jQuery widget that can be used as a tabbed toolbar or mega menu. The val() method is used to 2 min read jQWidgets jqxEditor val() Method 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 jqxEditor is used to represent a jQuery HTML text editor that can be used to simplify web content creation and 2 min read jQWidgets jqxSlider val() Method jQWidgets is a JavaScript framework for making web-based applications for PC and mobile devices. It is a very powerful and optimized framework, platform-independent, and widely supported. The jqxSlider is a jQuery widget that can be used to create a slider that selects from a range of values. It cus 2 min read Like