Javascript – runtime error: Object doesn’t support property or method, javascript, jquery, jquery-ui

I need to create a dialog with jQuery in a pretty big project. In some places, this project uses jquery wich version is different from the one I use recent for my window.

My code looks like this:

on ascx page

<html><head>  <link type="text/css" href="css/jquery-ui-1.8.22.custom.css" rel="stylesheet" />  <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>  <script type="text/javascript" src="js/jquery-ui-1.8.22.custom.min.js"></script>  <script type="text/javascript" src="js/myjQueryCode.js"></script></head><body></body></html>

in myjQueryCode.js file

$(document).ready(function() {    $("#dialog-form").dialog({        autoOpen: false,        height: 440,        width: 500,        modal: true,        closeOnEscape: false    });});

At runtime, I get the error:

Microsoft JScript runtime error: Object doesn't support property or
method 'dialog'

Best Solution

Thanks for your answers. The problem was that the library was included multiple times in different files.