You should just do this:
<script src="jquery-1.5.0.min.js"></script> <script src="jqueryui.min.js"></script> <script src="jquery.hoverintent.min.js"></script> <script src="main.js"></script>
where main.js contains:
var $jqueryold = $.noConflict(true); (function($){ // do stuff with $ $(document).ready(function(){ // ... }); })($jqueryold);
You can also skip the immediately executable function if all your code is inside the document:
var $jqueryold = $.noConflict(true); $jqueryold(document).ready(function($){ // do stuff with $ $("#tabs").tabs(); });
However, an ideal solution would be to upgrade the old code to work with the new version of jQuery.
source share