Benjamin,

Actually that bind function if somewhat model after one of your post.
I've refine it a little but I'm still having problem jqModal showing
up instead it's going to the next page.

<script type="text/javascript">
        $(document).ready(function () {
        bindModalBox = function(){
                $(".modal_box").each(function(){
                        $(".modal_box").click(function(){
                                $('#ex4').remove();
                                $('body').append('<div class="jqmDialog" 
id="ex4"><div
class="jqmdTC">Modal Dialog</div><div id="jqmdMSG"></div></div>');
                                $(".jqmdWide").width(600);
                                $('#ex4').jqm({
                                        ajax: '@href',
                                        target: "jqmdMSG",
                                        onHide: function(hash, serial){
                                                hash.o.remove();
                                                hash.w.remove();
                                        },
                                        modal: true,
                                        overlay: 30,
                                        overlayClass: 'whiteOverlay'
                                        }).jqmShow();
                                return false;
                        });//end click
                }); //end each
        } //end function
        bindModalBox();
        });
</script>
</head>
<body>
        <div id="demo-external">
            <h2>External Content</h2>
            <p><a href="http://localhost/testA.php";
class="modal_box">Show Box A</a></p>
                        <p><a href="http://localhost/testB.php";
class="modal_box">Show BoxB</a></p>
    </div>
</body>

Reply via email to