Reputation: 488
I have used this coding to creating a dialog box which can be moved and resizable and Could not see a dialog box as an output,please help and is there any libraries missing in it?
HTML
<script src="//code.jquery.com/jquery-1.10.2.js"> </script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
</script>
<body>
<div id="dialog" title="Basic dialog">
</body>
This is my Jquery function
<script>
$(function()
{
$( "#dialog" ).dialog();
});
</script>
Upvotes: 0
Views: 831
Reputation: 488
Just download and created a seperate folders and added these and atlast got the output
<link rel="stylesheet" href="css/jquery-ui.css"/>
<script src="js/jquery-1.9.1.js"></script>
<script src="js/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
Thanks all for the answers..took a lot of time to figure this out..
Upvotes: 2
Reputation: 123
$("#divAssetUrl").dialog({
autoOpen: true,
title: 'Add Assest Url',
minWidth: 500,
minHeight:500
});
<script src="~/Scripts/js/jquery.ui.dialog.js"></script>
<script src="~/Scripts/js/jquery-ui.js"></script>
Upvotes: 0
Reputation: 478
I'm recommending you to use this as your reference.
Notice this code:
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css">
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
or download the jQuery library from jQuery.com
and change it to..
<link rel="stylesheet" href="jquery-ui.css">
<script src="jquery-1.10.2.js"></script>
<script src="jquery-ui.js"></script>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
$(function() {
$( "#dialog" ).dialog();
});
</script>
Upvotes: 3
Reputation: 1600
Please add
<link rel="stylesheet" type="text/css"
href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/themes/ui-lightness/jquery-ui.css" />" media="screen" />
updated
<script src="//code.jquery.com/jquery-1.10.2.js" type="text/javascript">
<script src="//code.jquery.com/ui/1.11.0/jquery-ui.js" type="text/javascript">
<link href="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.9.2/themes/dot-luv/jquery-ui.css" type="text/css" rel="stylesheet">
Upvotes: 1
Reputation: 1304
You are loading jQuery library twice from two CDNs. Remove this line.
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"> </script>
Always remember to include jQuery library before any jQuery plugin is included. Also avoid multiple jQuery references.
Upvotes: 2