0

I have three items on my web site using two different versions of jquery. I have tried using no conflict, I don't completely understand the code though so everything I've tried hasn't worked and I know I'm probably missing something or adding something wrong. I'm running a slider, photo gallery and mobile(responsive) nav. I have version 1.10.1 for the gallery and slider but once I add 1.7.2 with the correct script, the nav works but the other two plugins do not.

<!--jquery-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js">

</script>
<!--photo gallery js-->
<script src="js/vendor/jquery.prettyPhoto.js" type="text/javascript" charset="utf-8">

</script>
<!--boiler plate js-->
<script src="js/vendor/modernizr-2.6.2.min.js"></script>
<script type='text/javascript' src='js/vendor/jquery.min.js'></script>
<script type='text/javascript' src='js/vendor/jquery.mobile.customized.min.js'></script>
<!--slider js-->
<script type='text/javascript' src='js/vendor/jquery.easing.1.3.js'></script>
<script type='text/javascript' src='js/vendor/camera.min.js'></script>
<!--mobile nav js-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript" src="js/vendor/jquery.mmenu.js"></script>
<!--mobile nav script-->
<script type="text/javascript">
    $(function() {
        $('nav#menu').mmenu({
            slidingSubmenus: false
        });

    });
</script>
<!--slider script-->
<script>
    jQuery(function() {

        jQuery('#camera_wrap_1').camera({
            thumbnails: true,
            loader: 'none',
            playPause: false,
            navigation: false,
            fx: 'scrollLeft',
            time: 1500
        });

    });
</script>
Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
saraht
  • 39
  • 1
  • 1
  • 8
  • 1
    Don't use same library multiple times. Use one latest version instead. – Justinas Feb 07 '14 at 15:56
  • When I do that the nav plugin does not work. – saraht Feb 07 '14 at 15:58
  • 2
    Ya try including only lastest jQuery version and just after, include jquery migrate. Or check DOC on how to use jQuery noConflict mode. But the good way would be to upgrade plugins. – A. Wolff Feb 07 '14 at 15:58
  • You really shouldn't be able to do that. You should upgrade or rerwrite the plugin. What is the issue with the plugin? Can you debug it? Have you looked into the jquery upgrade module? https://github.com/jquery/jquery-migrate/#readme – mr rogers Feb 07 '14 at 16:08
  • I don't know how to re write the plug in, again I don't know a lot about jquery. I have looked at the upgrade module and I'm sure I'm doing something wrong. Do I keep the 1.10.1 lirbary and after that put the link to the jquery migrate file? – saraht Feb 07 '14 at 16:11

0 Answers0