I need two jQuery sources and i don’t know if i am implementing .noConflict correctly?
<link href="count/jquery.countdown.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript" src="Count/jquery.countdown.js"></script>
<script type="text/javascript">
$(function () {
var Day = new Date();
Day = new Date(2015, 11, 22, 09, 00, 00, 00)
$('#defaultCountdown').countdown({until: Day});
$('#year').text(Day.getFullYear());
});
jQuery.noConflict(true);
</script>
<link rel="stylesheet" href="Video/css/jquery.fancybox.css" type="text/css" media="screen" />
<link rel="stylesheet" href="Video/css/style.css" type="text/css" media="screen" />
<script type="text/javascript" src="Video/js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="Video/js/flowplayer-3.1.1.min.js"></script>
<script type="text/javascript" src="Video/js/jquery.fancybox-1.2.1.pack.js"></script>
<script type="text/javascript" src="Video/js/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="Video/js/fancyplayer.js"></script>
<script type="text/javascript">
var videopath = "http://www.site.co.uk/Video/";
var swfplayer = videopath + "videos/flowplayer-3.1.1.swf";
</script>
Update: Regarding your update, I think you just need to specify a parameter for your ready handler:
So that the code inside the handler refers to the first version and not to the second one (the second jQuery include will overwrite
$otherwise).I think if you pass
true, which essentially also resetsjQuery, you have to assign a reference to that jQuery version on your own:jQuery passes a reference to itself as first argument to the ready handler.
If you include both scripts in the header, then
jQuerywill first reference the second included version. After callingjQuery.noConflict(true),jQuerywill refer to the first included version.But note from the documentation:
Make sure you include the versions and the plugins in the right order.