Object is not a function on call to dialog() function
<p>I keep getting "dialogDiv.dialog is not a function".</p>

<p>I'm simply trying to invoke the jQueryUI dialog off my reference to the div.</p>

<p>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.</p>

<p>not sure why and it's driving me nuts.</p>

<pre><code>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");
}
</code></pre>
