0

Both the codes are not working together, If i remove one then another is working properly. Please help me in resolving this conflict.

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.4/jquery-ui.min.js">                         <script>
    <script src="js/social/socialbars.js" type="text/javascript"></script>
    <link rel="stylesheet" type="text/css" href="css/social.css" />
    <script type="text/javascript" src="js/jquery.js"></script>
    <script src="js/jquery.tools.min.js"></script>
    <script>
    $(function () {
        $("#prod_nav ul").tabs("#panes > div", {
            effect: 'fade',
            fadeOutSpeed: 400,
            autoPlay : {
         enabled : true,
         delay: 1500
    }
        });
    });
    </script>


    <script type="text/javascript">

      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-36251023-1']);
      _gaq.push(['_setDomainName', 'jqueryscript.net']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();

    </script>
Pratik Joshi
  • 11,485
  • 7
  • 41
  • 73
user3472293
  • 35
  • 1
  • 3
  • any reason for having 2 versions? – Pete Mar 28 '14 at 11:05
  • possible duplicate of [Can I use multiple versions of jQuery on the same page?](http://stackoverflow.com/questions/1566595/can-i-use-multiple-versions-of-jquery-on-the-same-page) – Pete Mar 28 '14 at 11:07
  • both are doing different functions. Can i make it into one ? – user3472293 Mar 28 '14 at 11:08
  • 1
    tell the Error on console . – Pratik Joshi Mar 28 '14 at 11:08
  • 3
    jQuery UI must be included AFTER jQuery plugin and maybe `socialbars.js` too if this plugin is using jQuery. And please consider to open your console to check for error – A. Wolff Mar 28 '14 at 11:09
  • Usually you should be able to just use the latest version, but if you are using a plugin that requires a specific version then you could include more than one but I would advise against that. Or are you talking about using jquery with jquery ui, in that case do as A Wolff suggests – Pete Mar 28 '14 at 11:11
  • try jquery.noConflict(); – Kiranramchandran Mar 28 '14 at 11:15
  • Avoid referencing multiple jQuery files (preferably use min file).Also avoid using two page load functions.Use a single page load to execute all your code. – Ashutosh Mar 28 '14 at 12:07

2 Answers2

1

Try following

1)Include jquery plugin first ,

2)then jquery-ui ,

3)Then your Custom js files which are using above 2 plugins.

Pratik Joshi
  • 11,485
  • 7
  • 41
  • 73
0

you can try jQuery.noConflict() for your function

GoE
  • 586
  • 1
  • 8
  • 19