To disable an accordion in jQuery UI we will be using disable() method which is discussed below:
jQuery UI disable() Method is used to completely disable the accordion. It returns the acordion element completely to its initial state.
$( ".selector" ).accordion( "disable" )
Parameters: This method does not accept any parameters.
Return values: This method simply returns the button to its pre-initial state.
Approach: First, add jQuery Mobile scripts needed for your project.
<link href=”http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/ui-lightness/jquery-ui.css” rel=”stylesheet” type=”text/css” />
Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.