Deferred javascript noConflict different version jquery












1















In my one function I need use twice jquery version. One for all function and another jquery for one function..



I can not control conflict in deffering.




<script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/jquery-11.0.min.js'></script>
<script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/unitegallery.min.js'></script>
<script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/ug-theme-carousel.js'></script>
<script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/jquery-3.3.1.min.js'></script>



window.addEventListener('DOMContentLoaded', function () {
(function ($) {
jQuery(document).ready(function ($) {

// Need 2 different jquery version
LoadVideos();
});
})(jQuery);
});


// Need only 1 jquery version
window.addEventListener('DOMContentLoaded', function () {
(function ($) {
jQuery(document).ready(function ($) {
LoadAnaOwl();
LoadYayinAkisi();
$('body').on('click', '.mansetPaginition li a', function () {
$('.mansetPaginition li a').removeClass('active');
$(this).addClass('active');
});
$(document).on('mouseenter mouseleave', '.mansetPaginition li a', function () {
$('.mansetPaginition li a').removeClass('active');
$(this).addClass('active');
window.location.hash = this.hash;
});
});
})(jQuery);
});
</script>









share|improve this question



























    1















    In my one function I need use twice jquery version. One for all function and another jquery for one function..



    I can not control conflict in deffering.




    <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/jquery-11.0.min.js'></script>
    <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/unitegallery.min.js'></script>
    <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/ug-theme-carousel.js'></script>
    <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/jquery-3.3.1.min.js'></script>



    window.addEventListener('DOMContentLoaded', function () {
    (function ($) {
    jQuery(document).ready(function ($) {

    // Need 2 different jquery version
    LoadVideos();
    });
    })(jQuery);
    });


    // Need only 1 jquery version
    window.addEventListener('DOMContentLoaded', function () {
    (function ($) {
    jQuery(document).ready(function ($) {
    LoadAnaOwl();
    LoadYayinAkisi();
    $('body').on('click', '.mansetPaginition li a', function () {
    $('.mansetPaginition li a').removeClass('active');
    $(this).addClass('active');
    });
    $(document).on('mouseenter mouseleave', '.mansetPaginition li a', function () {
    $('.mansetPaginition li a').removeClass('active');
    $(this).addClass('active');
    window.location.hash = this.hash;
    });
    });
    })(jQuery);
    });
    </script>









    share|improve this question

























      1












      1








      1








      In my one function I need use twice jquery version. One for all function and another jquery for one function..



      I can not control conflict in deffering.




      <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/jquery-11.0.min.js'></script>
      <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/unitegallery.min.js'></script>
      <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/ug-theme-carousel.js'></script>
      <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/jquery-3.3.1.min.js'></script>



      window.addEventListener('DOMContentLoaded', function () {
      (function ($) {
      jQuery(document).ready(function ($) {

      // Need 2 different jquery version
      LoadVideos();
      });
      })(jQuery);
      });


      // Need only 1 jquery version
      window.addEventListener('DOMContentLoaded', function () {
      (function ($) {
      jQuery(document).ready(function ($) {
      LoadAnaOwl();
      LoadYayinAkisi();
      $('body').on('click', '.mansetPaginition li a', function () {
      $('.mansetPaginition li a').removeClass('active');
      $(this).addClass('active');
      });
      $(document).on('mouseenter mouseleave', '.mansetPaginition li a', function () {
      $('.mansetPaginition li a').removeClass('active');
      $(this).addClass('active');
      window.location.hash = this.hash;
      });
      });
      })(jQuery);
      });
      </script>









      share|improve this question














      In my one function I need use twice jquery version. One for all function and another jquery for one function..



      I can not control conflict in deffering.




      <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/jquery-11.0.min.js'></script>
      <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/unitegallery.min.js'></script>
      <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/ug-theme-carousel.js'></script>
      <script defer type='text/javascript' src='<%=FrSettings.Settings.AppVirtualPath %>resource/js/jquery-3.3.1.min.js'></script>



      window.addEventListener('DOMContentLoaded', function () {
      (function ($) {
      jQuery(document).ready(function ($) {

      // Need 2 different jquery version
      LoadVideos();
      });
      })(jQuery);
      });


      // Need only 1 jquery version
      window.addEventListener('DOMContentLoaded', function () {
      (function ($) {
      jQuery(document).ready(function ($) {
      LoadAnaOwl();
      LoadYayinAkisi();
      $('body').on('click', '.mansetPaginition li a', function () {
      $('.mansetPaginition li a').removeClass('active');
      $(this).addClass('active');
      });
      $(document).on('mouseenter mouseleave', '.mansetPaginition li a', function () {
      $('.mansetPaginition li a').removeClass('active');
      $(this).addClass('active');
      window.location.hash = this.hash;
      });
      });
      })(jQuery);
      });
      </script>






      javascript jquery html5 deferred-loading






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 15 '18 at 17:10









      Alican KablanAlican Kablan

      131210




      131210
























          1 Answer
          1






          active

          oldest

          votes


















          1














          Use jQuery.noConflict.



          jQuery.noConflict(bool) will return the jQuery function and restores the $ global variable to its old reference. bool indicates whether or not to remove all global jQuery variables, including jQuery. Calling jQuery.noConflict(true) if there are two versions of jQuery loaded will restore the globally scoped jQuery variables to those of the first version.



          window.addEventListener('DOMContentLoaded', function () {
          (function ($) {
          jQuery(document).ready(function ($) {
          window.jq331 = jQuery.noConflict(true);
          // Need 2 different jquery version
          LoadVideos();
          });
          })(jQuery);
          });





          <script src="https://code.jquery.com/jquery-1.1.js"></script>
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
          <script>
          var jq331 = jQuery.noConflict(true);
          //jQuery and $ is version 1.1.0
          //jq331 is version 3.3.1
          console.log('jQuery version:',jQuery.fn.jquery);
          console.log('$ version:', $.fn.jquery);
          console.log('jq331 version:',jq331.fn.jquery);
          </script>








          share|improve this answer


























          • For one query version is jq110 okey but for another ? I need 2 jquery version in LoadVideos

            – Alican Kablan
            Nov 15 '18 at 17:14











          • @AlicanKablan You shouldn't have 2 different versions of jQuery. Fix this issue first. Don't reply with "but I need it", find a way to fix it.

            – Adam
            Nov 15 '18 at 17:16











          • @AlicanKablan I have added a code snippet demo.

            – hev1
            Nov 15 '18 at 17:20











          • @hev1 Thank you my friend this is answer for me.

            – Alican Kablan
            Nov 15 '18 at 17:21













          • @AlicanKablan No problem.

            – hev1
            Nov 15 '18 at 17:24











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324645%2fdeferred-javascript-noconflict-different-version-jquery%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Use jQuery.noConflict.



          jQuery.noConflict(bool) will return the jQuery function and restores the $ global variable to its old reference. bool indicates whether or not to remove all global jQuery variables, including jQuery. Calling jQuery.noConflict(true) if there are two versions of jQuery loaded will restore the globally scoped jQuery variables to those of the first version.



          window.addEventListener('DOMContentLoaded', function () {
          (function ($) {
          jQuery(document).ready(function ($) {
          window.jq331 = jQuery.noConflict(true);
          // Need 2 different jquery version
          LoadVideos();
          });
          })(jQuery);
          });





          <script src="https://code.jquery.com/jquery-1.1.js"></script>
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
          <script>
          var jq331 = jQuery.noConflict(true);
          //jQuery and $ is version 1.1.0
          //jq331 is version 3.3.1
          console.log('jQuery version:',jQuery.fn.jquery);
          console.log('$ version:', $.fn.jquery);
          console.log('jq331 version:',jq331.fn.jquery);
          </script>








          share|improve this answer


























          • For one query version is jq110 okey but for another ? I need 2 jquery version in LoadVideos

            – Alican Kablan
            Nov 15 '18 at 17:14











          • @AlicanKablan You shouldn't have 2 different versions of jQuery. Fix this issue first. Don't reply with "but I need it", find a way to fix it.

            – Adam
            Nov 15 '18 at 17:16











          • @AlicanKablan I have added a code snippet demo.

            – hev1
            Nov 15 '18 at 17:20











          • @hev1 Thank you my friend this is answer for me.

            – Alican Kablan
            Nov 15 '18 at 17:21













          • @AlicanKablan No problem.

            – hev1
            Nov 15 '18 at 17:24
















          1














          Use jQuery.noConflict.



          jQuery.noConflict(bool) will return the jQuery function and restores the $ global variable to its old reference. bool indicates whether or not to remove all global jQuery variables, including jQuery. Calling jQuery.noConflict(true) if there are two versions of jQuery loaded will restore the globally scoped jQuery variables to those of the first version.



          window.addEventListener('DOMContentLoaded', function () {
          (function ($) {
          jQuery(document).ready(function ($) {
          window.jq331 = jQuery.noConflict(true);
          // Need 2 different jquery version
          LoadVideos();
          });
          })(jQuery);
          });





          <script src="https://code.jquery.com/jquery-1.1.js"></script>
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
          <script>
          var jq331 = jQuery.noConflict(true);
          //jQuery and $ is version 1.1.0
          //jq331 is version 3.3.1
          console.log('jQuery version:',jQuery.fn.jquery);
          console.log('$ version:', $.fn.jquery);
          console.log('jq331 version:',jq331.fn.jquery);
          </script>








          share|improve this answer


























          • For one query version is jq110 okey but for another ? I need 2 jquery version in LoadVideos

            – Alican Kablan
            Nov 15 '18 at 17:14











          • @AlicanKablan You shouldn't have 2 different versions of jQuery. Fix this issue first. Don't reply with "but I need it", find a way to fix it.

            – Adam
            Nov 15 '18 at 17:16











          • @AlicanKablan I have added a code snippet demo.

            – hev1
            Nov 15 '18 at 17:20











          • @hev1 Thank you my friend this is answer for me.

            – Alican Kablan
            Nov 15 '18 at 17:21













          • @AlicanKablan No problem.

            – hev1
            Nov 15 '18 at 17:24














          1












          1








          1







          Use jQuery.noConflict.



          jQuery.noConflict(bool) will return the jQuery function and restores the $ global variable to its old reference. bool indicates whether or not to remove all global jQuery variables, including jQuery. Calling jQuery.noConflict(true) if there are two versions of jQuery loaded will restore the globally scoped jQuery variables to those of the first version.



          window.addEventListener('DOMContentLoaded', function () {
          (function ($) {
          jQuery(document).ready(function ($) {
          window.jq331 = jQuery.noConflict(true);
          // Need 2 different jquery version
          LoadVideos();
          });
          })(jQuery);
          });





          <script src="https://code.jquery.com/jquery-1.1.js"></script>
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
          <script>
          var jq331 = jQuery.noConflict(true);
          //jQuery and $ is version 1.1.0
          //jq331 is version 3.3.1
          console.log('jQuery version:',jQuery.fn.jquery);
          console.log('$ version:', $.fn.jquery);
          console.log('jq331 version:',jq331.fn.jquery);
          </script>








          share|improve this answer















          Use jQuery.noConflict.



          jQuery.noConflict(bool) will return the jQuery function and restores the $ global variable to its old reference. bool indicates whether or not to remove all global jQuery variables, including jQuery. Calling jQuery.noConflict(true) if there are two versions of jQuery loaded will restore the globally scoped jQuery variables to those of the first version.



          window.addEventListener('DOMContentLoaded', function () {
          (function ($) {
          jQuery(document).ready(function ($) {
          window.jq331 = jQuery.noConflict(true);
          // Need 2 different jquery version
          LoadVideos();
          });
          })(jQuery);
          });





          <script src="https://code.jquery.com/jquery-1.1.js"></script>
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
          <script>
          var jq331 = jQuery.noConflict(true);
          //jQuery and $ is version 1.1.0
          //jq331 is version 3.3.1
          console.log('jQuery version:',jQuery.fn.jquery);
          console.log('$ version:', $.fn.jquery);
          console.log('jq331 version:',jq331.fn.jquery);
          </script>








          <script src="https://code.jquery.com/jquery-1.1.js"></script>
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
          <script>
          var jq331 = jQuery.noConflict(true);
          //jQuery and $ is version 1.1.0
          //jq331 is version 3.3.1
          console.log('jQuery version:',jQuery.fn.jquery);
          console.log('$ version:', $.fn.jquery);
          console.log('jq331 version:',jq331.fn.jquery);
          </script>





          <script src="https://code.jquery.com/jquery-1.1.js"></script>
          <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
          <script>
          var jq331 = jQuery.noConflict(true);
          //jQuery and $ is version 1.1.0
          //jq331 is version 3.3.1
          console.log('jQuery version:',jQuery.fn.jquery);
          console.log('$ version:', $.fn.jquery);
          console.log('jq331 version:',jq331.fn.jquery);
          </script>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Nov 15 '18 at 17:23

























          answered Nov 15 '18 at 17:13









          hev1hev1

          5,9183529




          5,9183529













          • For one query version is jq110 okey but for another ? I need 2 jquery version in LoadVideos

            – Alican Kablan
            Nov 15 '18 at 17:14











          • @AlicanKablan You shouldn't have 2 different versions of jQuery. Fix this issue first. Don't reply with "but I need it", find a way to fix it.

            – Adam
            Nov 15 '18 at 17:16











          • @AlicanKablan I have added a code snippet demo.

            – hev1
            Nov 15 '18 at 17:20











          • @hev1 Thank you my friend this is answer for me.

            – Alican Kablan
            Nov 15 '18 at 17:21













          • @AlicanKablan No problem.

            – hev1
            Nov 15 '18 at 17:24



















          • For one query version is jq110 okey but for another ? I need 2 jquery version in LoadVideos

            – Alican Kablan
            Nov 15 '18 at 17:14











          • @AlicanKablan You shouldn't have 2 different versions of jQuery. Fix this issue first. Don't reply with "but I need it", find a way to fix it.

            – Adam
            Nov 15 '18 at 17:16











          • @AlicanKablan I have added a code snippet demo.

            – hev1
            Nov 15 '18 at 17:20











          • @hev1 Thank you my friend this is answer for me.

            – Alican Kablan
            Nov 15 '18 at 17:21













          • @AlicanKablan No problem.

            – hev1
            Nov 15 '18 at 17:24

















          For one query version is jq110 okey but for another ? I need 2 jquery version in LoadVideos

          – Alican Kablan
          Nov 15 '18 at 17:14





          For one query version is jq110 okey but for another ? I need 2 jquery version in LoadVideos

          – Alican Kablan
          Nov 15 '18 at 17:14













          @AlicanKablan You shouldn't have 2 different versions of jQuery. Fix this issue first. Don't reply with "but I need it", find a way to fix it.

          – Adam
          Nov 15 '18 at 17:16





          @AlicanKablan You shouldn't have 2 different versions of jQuery. Fix this issue first. Don't reply with "but I need it", find a way to fix it.

          – Adam
          Nov 15 '18 at 17:16













          @AlicanKablan I have added a code snippet demo.

          – hev1
          Nov 15 '18 at 17:20





          @AlicanKablan I have added a code snippet demo.

          – hev1
          Nov 15 '18 at 17:20













          @hev1 Thank you my friend this is answer for me.

          – Alican Kablan
          Nov 15 '18 at 17:21







          @hev1 Thank you my friend this is answer for me.

          – Alican Kablan
          Nov 15 '18 at 17:21















          @AlicanKablan No problem.

          – hev1
          Nov 15 '18 at 17:24





          @AlicanKablan No problem.

          – hev1
          Nov 15 '18 at 17:24




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53324645%2fdeferred-javascript-noconflict-different-version-jquery%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Xamarin.iOS Cant Deploy on Iphone

          Glorious Revolution

          Dulmage-Mendelsohn matrix decomposition in Python