dialog box not showing error
I`m having the following error . Why am I having this error and how can I solve it?
$("SelectProject").dialog is not a function http://localhost:1419/Customer Line 57
$("#SelectProject").dialog is not a function http://localhost:1419/Customer Line 69
My codes are as follows:
$(document).ready(function() {
$("#project_link").click(function() {
$('SelectProject').dialog('open');
return false;
});
$('#SelectProject').dialog({
autoOpen: false,
width: 800,
position: [130, 200],
buttons: {
"Cancel": function() {
$(this).dialog("close");
},
"Accept": function() {
$(this).dialog("close");
}
开发者_开发技巧 }
});
Did you include the jQuery UI script file? "dialog()" is the jQuery UI method.
You can include this library like this:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.0/jquery-ui.min.js"></script>
This tag you need to put in the <head> section of you html document.
Also, your selector in your click function looks wrong it should be:
$('#SelectProject').dialog('open');
(Assuming the element has an id of SelectProject)
精彩评论