Doug,

In your first example, the data is not in the DOM yet. Try something
like:

$("#button-sales").click(function(e) {
        e.preventDefault();
        $.get("includes/institutional-sales.html", function(data){
                // create a modal dialog with the data
                $('<div>' + data + '</div>').modal({
                        onClose: modalClose,
                        onOpen: modalOpen,
                        containerCss: {
                                height: 420,
                                width: 342
                        }
                }); // contains a button with simplemodal-close class
        });
});

If that doesn't work, let me know ;)

-Eric

On Mar 30, 1:07 pm, dbonneville <doug.bonnevi...@gmail.com> wrote:
> I have this example too. I have the data loaded, and onShow will
> trigger an alert if I put one in, but the close button still does not
> work:
>
> $("#button-sales").click(function(event) {
>
>                         
> $("#modalContentInstSales").load("includes/institutional-
> sales.html");
>
>                         $('#modalContentInstSales').modal({
>                                 onClose: modalClose,
>                                 onOpen: modalOpen,
>                                 containerCss: {
>                                         height: 420,
>                                         width: 342
>                                 },
>                                 onShow: function (dialog){
>                                         $(".simplemodal-close", 
> dialog.data).click(function (e) {
>                                                 e.preventDefault();
>                                                 $.modal.close();
>                                         });
>                                 }
>                         });
>                 });

Reply via email to