Uncaught TypeError: $(...).dialog is not a function

Total Post:26

Points:182
 5840  View(s)
Ratings:
Rate this:
Hi Everyone,

 I have created a one dialog box in jQuery and when i run the program ,dialog is not working properly. When i open in browser console It will thow this type error:
Uncaught TypeError: $(...).dialog is not a function

My Dialog Code is below:

<div id="dialog-alert" style="display: none">
    <p>
           ...................
    </p>
</div>
<script type="text/javascript">
$(document).ready(function () {
       
       var url = "";
        $(
        $("#dialog-alert").dialog({
            autoOpen:
            autoOpen:true,
            resizable:
            resizable:true,
            height: 100,
            width: 350,
            show: { effect:
            height: 100,
            width: 350,
            show: { effect:'drop', direction: "up" },
            modal:
            modal:true,
            draggable:
            draggable:true,
            open:
            open:function (event, ui) {
                $(
                $(".ui-dialog-titlebar-close").hide();
            },
            buttons: {
               
            },
            buttons: {
               "OK": function () {
                    $(
                    $(this).dialog("close");
                }
            }
        });
    });
</script>
                }
            }
        });
    });
</script>

Please can anyone give me a solution.
Thank you.
  1. Post:1

    Points:7
    Re: Uncaught TypeError: $(...).dialog is not a function

    I got the same error and my dialog is nit loading but normal form is loading and working.
    No jquery loading 

Answer