Question

I've got a jqModal dialog:

function initOrderIdCardDialog() {
    $('#orderIdCardDialog').jqm({
        trigger: '#orderIdCardButton',
        overlay: 85, /* 0-100 (int) : 0 is off/transparent, 100 is opaque */
        overlayClass: 'dialogOverlay',
        closeClass:'cancelOrderIDCard',
        onShow: showDialog,
        onHide: hideDialog,
        toTop: true
    });
}

that is called after some html:

<a href="#" class="sideBtn" id="orderIdCardButton">Order ID Card</a>
...
<div id="orderIdCardDialog" class="dialog">
    ...
</div>
<script type="text/javascript" charset="utf-8">
    initOrderIdCardDialog();
</script>

and when the page is loading, an exception is thrown in jqModal.js:

Uncaught TypeError: undefined is not a function

on line 34 of jqModal.js, just after:

$.fn.jqmAddTrigger=function(e){return hs(this,e,'jqmShow');};

As a result, clicking on the link does not show a dialog. If I replace the jQuery selector with an empty string for the trigger, the exception is not thrown. I'm a bit confused because jqModal's site says that a jQuery selector is valid. Any help would be greatly appreciated. Thank you.

Was it helpful?

Solution

Per anpsmn:

What's the version of jQuery? It doesn't work with 1.9+. See fiddle. Change it to 1.8.3 in the fiddle and it works.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top