Issue with jQuery UI dialog?

Hello, dear abrowser!

Can't understand the problem with jQuery UI 1.8.18. (jQuery 1.7.1)

$('#newnews_dialog').dialog({
 autoOpen: false,
 width: 600,
 buttons: {
 "Cancel": function() {
$(this).dialog("close");
},
 "Save": function() {
saveNews();
}
}
});

$('#newnews_button').click(function(){
$('textarea.newnews').tinymce({
 script_url: base_url + 'js/tiny_mce/tiny_mce.js',
 theme: "simple",
});
$('#newnews_dialog').dialog('open');
 return false;
});


When you call firefox reports
TypeError: $("#newnews_dialog").dialog is not a function



However, in chrome everything works as expected.
October 8th 19 at 01:21
2 answers
October 8th 19 at 01:23
Try to roll back the UI to 1.7.2 and check.
link - nolan.Gleason commented on October 8th 19 at 01:26
Error is quite common. I have recovered that way. If it doesn't fit, Google "dialog is not a function" — results much. - nolan.Gleason commented on October 8th 19 at 01:29
Did not help :( - Darrel_Gottlieb commented on October 8th 19 at 01:32
Googled. Usually the error lies in the fact that the script stuff is not in document ready - Darrel_Gottlieb commented on October 8th 19 at 01:35
+ a bunch of other options. dubbing jquery, its wrong connection, broken library, and more.
Create a bare file with a window and I'm pretty confident that everything will be OK. elimination method right below suggest. - nolan.Gleason commented on October 8th 19 at 01:38
api.jquery.com/jQuery.noConflict/
and, just in case. - nolan.Gleason commented on October 8th 19 at 01:41
October 8th 19 at 01:25
In the above code, the errors I see, maybe a conflict with tiny mce? check for duplicate id on the page
Even without tinymce does not want to... - nolan.Gleason commented on October 8th 19 at 01:28
If from the console to apply .dialog() to the body, the method also does not work (error is the same). - nolan.Gleason commented on October 8th 19 at 01:31
try the method of exclusion to remove all scripts which are not relevant UI - Darrel_Gottlieb commented on October 8th 19 at 01:34
The exception of the scripts did not help. Helped the exception of the html code. Localized, now I will understand. Thank you all. - Darrel_Gottlieb commented on October 8th 19 at 01:37
It was in the widget authorization eauth-yii, probably something conflicted... - nolan.Gleason commented on October 8th 19 at 01:40

Find more questions by tags JavaScriptjQuery