Can't get the jQuery dialog to popup
<p>I am trying to get the jQuery dialog box to popup up after pressing the "upvote" link here: <a href="http://www.problemio.com" rel="nofollow">http://www.problemio.com</a></p>

<p>(I was working from this example, and then modified it since it didn't work for me: <a href="http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/" rel="nofollow">http://blog.nemikor.com/2009/04/08/basic-usage-of-the-jquery-ui-dialog/</a> )</p>

<p>Here is the jQuery code I have so far which doesn't work :)</p>

<pre><code>&lt;script type="text/javascript"&gt;
$(document).ready(function() 
{
   var $dialog = $('.dialog')
           .dialog({
               autoOpen: false,
               title: 'Basic Dialog'
           });   

    $('.vote_up').click(function() 
    {        
        problem_id = $(this).attr("data-problem_id");

        var dataString = 'problem_id='+ problem_id + '&amp;vote=+';

        $.ajax({
                type: "POST",
                url: "/problems/vote.php",
                dataType: "json",
                data: dataString,
                success: function(data)
                {           
                    // ? :)
                    alert (data);   
                },
                error : function(data) 
                {
                    //alert("ajax error, json: " + data.responseText);
                    errorMessage = data.responseText;

                    if ( errorMessage == "not_logged_in" )
                    {
                        alert ("errr");

                        // Try to create the popup that asks user to log in.
                        //$(this).dialog();
                        //$(".dialog").dialog();
                        $dialog.dialog('open');
                        // prevent the default action, e.g., following a link
                        return false;
                    }
                    else
                    {
                        alert ("not");
                    }

                    //alert(JSON.stringify(data));
                }
            });


        //Return false to prevent page navigation
        return false;
    });

    $('.vote_down').click(function() 
    {
        alert("down");

        problem_id = $(this).attr("data-problem_id");

        var dataString = 'problem_id='+ problem_id + '&amp;vote=-';        

        //Return false to prevent page navigation
        return false;
    });    
});
&lt;/script&gt;
</code></pre>

<p>Above this code I have another jQuery function that also has a documentOnready check.  Would that matter? Should I make the dialog box code global? If so, how do I do that?</p>

<p>In any case, how can I get the dialog box to open for me with the setup I have now?</p>

<p>Thanks!!</p>

<p>Changed my jQuery imports to this:</p>

<pre><code>&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.16/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js" /&gt;
</code></pre>
