Friday, May 17, 2024
 Popular · Latest · Hot · Upcoming
64
rated 0 times [  65] [ 1]  / answers: 1 / hits: 16817  / 13 Years ago, sun, december 25, 2011, 12:00:00

I have a problem using jQuery ui and dialog() function:




Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method 'dialog'




I've googled around many people with the same problem solved that issue with a correct inclusion of jQuery library.



This is the header: http://pastebin.com/e1cTKGK9



And this is the gpf1.js source: http://pastebin.com/0jXhU503


More From » jquery

 Answers
9

In line 48 in your gpf1.js file



$.dialog();


This $. sign applies the dialog method to the whole jquery element. you should use the dialog method to a DOM element you want like:



$(foo).dialog()


And here's part of the DEMO from jqueryui.com.



    $(function() {
$( #dialog ).dialog();
});
</script>



<div class=demo>
<div id=dialog title=Basic dialog>
<p>This is the default dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
</div>

[#88390] Thursday, December 22, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mustafaericho

Total Points: 322
Total Questions: 103
Total Answers: 110

Location: Montenegro
Member since Thu, Jun 16, 2022
2 Years ago
mustafaericho questions
Mon, May 31, 21, 00:00, 3 Years ago
Sun, May 23, 21, 00:00, 3 Years ago
Sat, Feb 13, 21, 00:00, 3 Years ago
Sat, Jan 2, 21, 00:00, 3 Years ago
Thu, Nov 12, 20, 00:00, 4 Years ago
;