views:

49

answers:

2

On my page, I am loading some HTML (via AJAX) into a div. The new HTML contains my $('.modal') jQuery UI Dialog. Once the HTML is loaded, FireBug gives me an error message for each modal in my HTML saying:

$(".modal").dialog is not a function
    height: 'auto'

The weird thing is that it's working. When I click the element that triggers the modal to appear, it appears! What should I do to prevent these messages from showing?

A: 

You probably have to call $(".modal").dialog after the ajax has finished loading

fehays
I am already doing that, and I still get this message.
Andrew
A: 

hmm

var dialog = $(".modal").dialog({ autoOpen: false });


$("#click").click( function(e) {
   e.preventDefault();
   dialog.dialog("open");
});

this one works for me fine !

Alexander Corotchi
that did not fix it for me
Andrew