Simplemodal AJAX

Posted by Maxime on Stack Overflow See other posts from Stack Overflow or by Maxime
Published on 2010-05-21T16:55:47Z Indexed on 2010/05/21 17:00 UTC
Read the original article Hit count: 341

Filed under:
|
|
|

Hello guys,

I'm trying to implement Simplemodal on my website. Simple text boxes are really easy to do, but I can't find a way to have another page showing through AJAX. I know very little about Jquery and there is no documentation on how to do it, so could somebody help me? Thanks.

This is the default code of a Simple Modal box:

jQuery(function ($) {
$('#basic-modal .basic').click(function (e) {
    $('#basic-modal-content').modal();

      return false;
});});

This is some code I took from the Simple Modal contact form that works with AJAX. I've been trying to tweak it but I don't really understand the structure of it. As I said, I'm completely new to Jquery.

                $.get("data/contact.php", function(data){
                // create a modal dialog with the data
                $(data).modal({
                    closeHTML: "<a href='#' title='Close' class='modal-close'>x</a>",
                    position: ["15%",],
                    overlayId: 'contact-overlay',
                    containerId: 'contact-container',
                    onOpen: contact.open,
                    onShow: contact.show,
                    onClose: contact.close
                });
            });
        });

© Stack Overflow or respective owner

Related posts about web

Related posts about simplemodal