Object is not a function on call to dialog() function
Posted
by coffeeaddict
on Stack Overflow
See other posts from Stack Overflow
or by coffeeaddict
Published on 2010-04-13T19:06:25Z
Indexed on
2010/04/13
19:13 UTC
Read the original article
Hit count: 111
jQuery
I keep getting "dialogDiv.dialog is not a function".
I'm simply trying to invoke the jQueryUI dialog off my reference to the div.
So incoming is the divID, for example "myDiv". Then I set it to a variable and wrap it in $("#" + myDiv); so that now I have a reference to it in a nice clear variable. Then I try to invoke the dialog function and get that error.
not sure why and it's driving me nuts.
function showDialog(divID)
{
// Get reference to the div element
var dialogDiv = $("#" + divID);
alert("dialogDiv:" + dialogDiv);
dialogDiv.dialog
(
{
bgiframe: true,
modal: true,
autoOpen: false,
show: 'blind'
}
)
dialogDiv.dialog("open");
}
© Stack Overflow or respective owner