Home > DeveloperSection > Forums > Uncaught TypeError: $(...).dialog is not a function
Sachin Singh
Sachin Singh

Total Post:26

Points:182
Posted on    April-01-2016 12:54 AM

 JQuery C#  ASP.Net  JQuery  ASP.NET MVC  Entity Framework  Jquery UI  Razor 
Ratings:


 1 Reply(s)
 2207  View(s)
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:
true,
            resizable:
true,
            height: 100,
            width: 350,
            show: { effect:
'drop', direction: "up" },
            modal:
true,
            draggable:
true,
            open:
function (event, ui) {
                $(
".ui-dialog-titlebar-close").hide();
            },
            buttons: {
               
"OK": function () {
                    $(
this).dialog("close");
                }
            }
        });
    });
</script>


Please can anyone give me a solution.
Thank you.


Mahfuzur Rahman

Total Post:1

Points:7
Posted on    April-16-2016 2:41 AM

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

Don't want to miss updates? Please click the below button!

Follow MindStick