Skip to content
Related Articles

Related Articles

How to enable a jQuery UI menu ?

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 20 Jan, 2021

jQuery UI consists of GUI widgets, visual effects, and themes implemented using jQuery, CSS, and HTML. jQuery UI is great for building UI interfaces for the webpages. jQuery UI menu is a Themeable menu that is used with mouse and keyboard interactions for navigating between pages. In this article, we will show how to enable a menu in jQuery UI.


$(".selector").menu( "enable" );

Approach: First, add jQuery UI scripts needed for your project.

<link href = “” rel = “stylesheet”>

<script src = “”></script>

<script src = “”></script>

Example 1: In this example, we will be creating and enabling the menu for our purposes. 


<!doctype html>
<html lang = "en">
      <meta charset = "utf-8">
      <link href
         rel = "stylesheet">
      <script src = ""></script>
         .ui-menu {
            width: 200px;
         $(function() {
            $( "#gfg" ).menu();
            $( "#gfg" ).menu("enable");
      <h1>jQuery UI | enable menu </h1>
      <ul id = "gfg">
         <li><a href = "">1st</a></li>
         <li><a href = "">2nd</a></li>
         <li><a href = "">3rd</a></li>
         <li><a href = "">2th</a></li>
         <li><a href = "">5th</a></li>


My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!