How? JQuery finding document elements in another file?

How? JQuery finding document elements in another file?

I have this jQuery function I made, that I would like to be reusable.  I have placed it by itself in a file called jqDialogs.js:


  1.        //--------------------------------------------------------------------
            function jqConfirm(msg, okLabel,cancelLabel,okCallBack,cancelCallBack){
                $("#jqConfirmDialog").text(msg);
                $("#jqConfirmDialog").dialog({
                    resizable: false,
                    modal: true,
                    draggable: false,
                    buttons:[
    
                    {
                      text: okLabel,
                      click: function(){$(this).dialog("close");okCallBack();}
                    },/* end ok button*/
                    {
                      text: cancelLabel,
                      click: function(){$(this).dialog("close");cancelCallBack();}
                    }/*end cancel button*/
    
    
                    ]/*end buttons*/ 
                         
                    });// end .dialog()
            }// end funciton jqConfirm()
    
    //-----------------------------------------------------------------------------


The problem is that my document element called "jqConfirmDialog" is another file, so jQuery can't find it.   Since jQuery takes in the name of the ID to go look up the element on its own, I'm not sure how I can change things so that my jQuery function can get to the document element in the other file.

Thanks

Steve