dialog display automaticaly when i load web page

Posted by robert trudel on Stack Overflow See other posts from Stack Overflow or by robert trudel
Published on 2013-10-23T21:51:26Z Indexed on 2013/10/23 21:53 UTC
Read the original article Hit count: 105

Filed under:
|

When i load my web page, i have a dialog who open automatically. I don't want that.

I put a image and when i click on it, i would like dialog open

my js

       $("#deleteReportButton").click(function() {
             $("#deleteReportConfirm").dialog("open");
        });


        $("#deleteReportConfirm").dialog({
            resizable: false,
            height: 140,
            modal: true,
            buttons: {
                "Delete report": function() {
                    $(this).dialog("close");
                },
                Cancel: function() {
                    $(this).dialog("close");
                }
            }
        });

html part

       <div id="deleteReportConfirm" title="Delete report?" style="display:none">
           <p>....</p>
       </div> 

       <img id="deleteReportButton" src="/plato/resources/images/delete.png" />

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about jquery-ui