forum

Home / DeveloperSection / Forums / Uncaught TypeError: $(...).dialog is not a function

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

Sachin Singh 8654 01-Apr-2016
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.

Can you answer this question?


Answer

1 Answers

Liked By