jQueryUI: excepción no detectada: no se pueden llamar métodos
Soy muy nuevo en jQuery e intento ejecutar un cuadro de diálogo jQueryUI bastante simple en mi aplicación PHP. En la consola firebug me sale el error:
uncaught exception: cannot call methods on dialog prior to initialization; attempted to call method 'open'
Aquí está mi código:
$(function() {
$( "#dialog" ).dialog({
autoOpen: false,
show: "blind",
hide: "explode"
});
$( "#opener" ).live('click',function() {
$( "#dialog" ).dialog( "open" );
return false;
});
});
Busqué en Google el error y no apareció mucho, excepto quejquery.ui.js
está generando el error con:
if ( isMethodCall ) {
this.each(function() {
var instance = $.data( this, name );
if ( !instance ) {
throw "cannot call methods on " + name + " prior to initialization; " +
"attempted to call method '" + options + "'";
}
...
¿Algunas ideas? Agradezco cualquier ayuda sobre qué es este mensaje de error y cómo resolverlo.
ACTUALIZAR: Intenté comentar las opciones de mostrar / ocultar y eso no tuvo ningún efecto en mi problema. A continuación se muestra el HTML:
<div class="demo">
<div id="dialog" title="Basic dialog">
<p>This is an animated dialog which is useful for displaying information. The dialog window can be moved, resized and closed with the 'x' icon.</p>
</div>
<button id="opener">Open Dialog</button>
</div><!-- End demo -->
Este HTML está incluido en un archivo PHP, que está INCLUIDO en otro archivo PHP.