Open dialogue box on <div> click?
<p>My site pages run off <code>header.php</code>, which contains all the JavaScript and CSS needed for all the pages.</p>

<p>What I am trying to do is make it so that, whatever page a user is on, if they click the <code>&lt;div&gt;</code> <code>.register_button_click</code>, they will have a JavaScript dialogue box open up. I have placed the JavaScript in the header.php file and have created my <code>&lt;div class="register_button_click"&gt;click here&lt;/div&gt;</code>, but it's not bringing anything up.</p>

<p>Where am I going wrong?</p>

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

            $('#register_button_click').click(function () {
                $dialog.dialog('open');
                return false; ////cancel eventbubbeling
            });
        });

        function showDialog() {
            $dialog.dialog('open');
            return false //cancel eventbubbeling
        }

    &lt;/script&gt;
 &lt;/head&gt;
</code></pre>
