在模式内加载HTML文件

I'm having issues loading an html file within a modal.

<script type="text/javascript">
$(document).ready(function() {
    $('#modal-dialog-link-3').modalDialog({
    headingText:'test',
    ajax:{
    url:'consent.html'
    },
    activator:'#modal-dialog-link-3'
    });     
});
</script>

<a href="#" id="modal-dialog-link-3" class="link">Click here</a>

Here is the html file that I'm trying to load consent.html

<div id="openModal" class="modalDialog">
    <div class="modal">
        <div class="modal-top">
            <a href="#close" title="Close" class="close">+</a>
            <p class="articlesubtitle">Thank You</p>
        </div>
        <div class="modal-middle">
            <p class="articlesubtitle">test</p>
            </div>
     </div>
</div>

I'm getting the following error: Uncaught TypeError: Object [object Object] has no method 'modalDialog' modal.shtml:57(anonymous function)

somewhere there needs to be a jQuery plugin that defines modalDialog. Your error suggests you don't have one.

It would look something like $.fn. modalDialog = function(){ /* .... */ }