[RESOLVED]Jquery UI dialogue not opening second time?

Hi, I have a MVC Razor partial view loaded in a JQuery dialogue.

It opens fine for the first time but not after that.

Also the close button does not work on dialogue window, the "X" icon in top right closes it fine.

here is my code:

<script src="@Url.Content("~/Scripts/jquery-1.7.1.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery-ui-1.8.20.js")"></script>

<script type="text/javascript">
    $(function () {
            autoOpen: false,
            height: 'auto',
            width: 700,
            modal: true,
            open: function (event, ui) {
                $(this).load("@Url.Action("Create", "Invoice")");
                    "Close": function () {

        $("#opener").click(function (e) {


<div id="dialog" title="Add Plot">Please wait</div>

    <a href="#" id="opener" name="opener" class="m-btn green-stripe" style="margin-bottom: 15px; margin-left: 10px;"><i class="icon-plus"></i>Add Plot</a>

Thanks & Regards

Got it.


Leave a Reply