Skip to content
Related Articles
Open in App
Not now

Related Articles

jQuery UI Menu destroy() Method

Improve Article
Save Article
  • Last Updated : 19 Feb, 2021
Improve Article
Save Article

The 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 a mouse and keyboard interactions for navigating between pages. In this article, we will show how to destroy a menu in jQuery UI.


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

Parameters: This method does not accept any parameter.

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

<link href = “” rel = “stylesheet”>
<script src = “”></script>
<script src = “”></script>



<!DOCTYPE html>
<html lang="en">
    <meta charset="utf-8" />
    <link href=
    <script src=
    <script src=
      .ui-menu {
        width: 200px;
      $(function () {
      function gfg() {
    <h1>jQuery UI | destroy 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>
    <button onclick="gfg()">Click to destroy</button>




My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!