1

When I have only one modal dialog It works in Safari too. In this case I am using default jqModal selectors as shown below

HTML

<a href="#" class="jqModal">Start Demo 1</a>

<div class="jqmWindow" id="dialog"> Demo 1 </div>

JS

$('#dialog').jqm({modal:true});

But when I add multiple links to open separate dialogs, it doesn't work in safari. It works on all other browsers.

HTML code for multiple dialogs

<a id="startDemo1" href="#">
  <h3 class="demo-heading">Demo 1</h3>
</a>
<div id="Demo1" class="jqmWindow">
  <p>Demo 1</p>
</div>

<a id="startDemo2" href="#">
  <h3 class="demo-heading">Demo 2</h3>
</a>
<div id="Demo2" class="jqmWindow">
  <p>Demo 2 Let's see if it launches new dialog</p>
</div>

Javascript

$(document).ready(function(){   

    $('div.jqmWindow').jqm({modal:true, overlay: 50, trigger: false})

    $('#startDemo1').click(function() {
        $('#Demo1').jqmShow();
        return false;
    });

    $('#startDemo2').click(function() {
        $('#Demo2').jqmShow();
        return false;
    });

});

Please let me know if you have any solution or a better way to implement multiple modal dialogs.

0

1 Answer 1

2

Just wanted to correct the JS code I posted

$('div.jqmWindow').jqm({modal:true, overlay: 50, trigger: false})

should have been

$("Demo1").jqm({modal:true, overlay: 50, trigger: false})
$("Demo2").jqm({modal:true, overlay: 50, trigger: false})

But I still can't get the 2 modal dialogs launched on Safari.

All other browsers are working. They were somehow working even with the wrong JS earlier.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.