Jquery – Open Jquery modal dialog on click event


The below code works fine for only the first click event. However for any subsequent click nothing happens.
I tested this on firefox, ie7 but still the same. Am I missing something?

<script type="text/javascript">
$(document).ready(function() {
    $('#dialog_link').click(function() {
        return false;
   <div id="dialog" title="Dialog Title" style="display:none"> Some text</div>  
   <p id="dialog_link">Open Dialog</p>  

Best Solution


$(document).ready(function () {
    $('#dialog_link').click(function () {
        return false;

there is a open arg in the last part