M
M
Mobyman2012-03-26 09:41:23
JavaScript
Mobyman, 2012-03-26 09:41:23

Problem with jQuery UI dialog?

Hello, dear habrausers!
Can't figure out what's causing the issue with jQuery UI 1.8.18. (jQuery 1.7.1)

$('#newnews_dialog').dialog({<br>
  autoOpen: false,<br>
  width: 600,<br>
  buttons: {<br>
    "Отмена": function() {<br>
      $(this).dialog("close");<br>
    },<br>
    "Сохранить": function() {<br>
      saveNews();<br>
    }<br>
  }<br>
});<br>
<br>
$('#newnews_button').click(function(){<br>
  $('textarea.newnews').tinymce({<br>
    script_url: base_url + 'js/tiny_mce/tiny_mce.js',<br>
    theme: "simple",<br>
  });<br>
  $('#newnews_dialog').dialog('open');<br>
  return false;<br>
}); <br>

When called, firefox reports
TypeError: $(&quot;#newnews_dialog&quot;).dialog is not a function


However, in chrome everything works as expected.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Arthur Koch, 2012-03-26
@dudeonthehorse

Try to rollback UI to 1.7.2 and check.

I
Ilya Shabanov, 2012-03-26
@ishaba

I don't see any errors in the code you provided, maybe a conflict with tiny mce? check if id's are duplicated on the page

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question