Skip to content
Related Articles
Open in App
Not now

Related Articles

jQuery UI Dialog closeText Option

Improve Article
Save Article
  • Last Updated : 12 Jan, 2021
Improve Article
Save Article

closeText option is used to replace the default value on the close button. By default, value is “close”.


$( ".selector" ).dialog({
   closeText : "close"

Approach: 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>
    <script src=
        $(function () {
                autoOpen: false,
                closeText: "click!"
            $("#geeks").click(function () {
    <div id="gfg" title="GeeksforGeeks">
        Jquery UI| closeText dialog option
    <button id="geeks">Open Dialog</button>


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!