Is there a way to use 2 jQuery libraries at once?
I am trying to use the Flexslider2 plug-in on a website that is using the 1.3.2 library; the slider only works with versions 1.4.2+. If I reference a newer library, other functionality on the site breaks.
I don't have the ability to update the reference to the 1.3.2 library, or modify that piece of the site at all; only update a "zone" on a page via a CMS. These are the scripts I'm using in that zone which is resulting in an error that says
TypeError: slider.slides.first is not a function
and the slider doesn't work. I am new to jQuery so any help in getting the new AND the old libraries to play nicely together would be greatly appreciated. Thank you.
<!-- load jQuery 1.8.3 -->
<script type="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
var jQuery_1_8_3 = $.noConflict(true);
</script>
<script type="text/javascript" src="../js/jquery.flexslider.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('.flexslider').flexslider({
animation: "slide"
});
});
</script>
I also tried the last script tag this way:
<script type="text/javascript">
jQuery_1_8_3(window).load(function() {
jQuery_1_8_3('.flexslider').flexslider({
animation: "slide"
});
});
</script>
which gives me this error in the console:
TypeError: jQuery_1_7_2(...).flexslider is not a function