gundambison

jquery no conflict

Mar 6th, 2018
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 0.66 KB | None | 0 0
  1. <html>
  2. <body>
  3.     <div id='debug'>
  4.     debug<hr/>
  5.     </div>
  6.     <script src="jquery-3.3.1.min.js"></script>
  7.     <script>
  8.         debug("1nd loaded jQuery version ($): " + $.fn.jquery+"<hr>");
  9.         function debug(str){
  10.             $("#debug").append(str).append("<br>");
  11.         }
  12.      
  13.     </script>
  14.     <script src="jquery.2.1.4.js"></script>
  15.     <script>
  16.         jq21 = jQuery.noConflict( true );
  17.     </script>
  18.     <script src="jquery.1.10.2.js"></script>
  19.     <script>
  20.         jq110 = jQuery.noConflict( true );
  21.  
  22.         debug("1nd loaded jQuery version ($): " + $.fn.jquery);
  23.         debug("2nd loaded jQuery version ($): " + jq21.fn.jquery);
  24.         debug("3nd loaded jQuery version ($): " + jq110.fn.jquery);
  25.     </script>
  26.  
  27. </body>
  28. </html>
Advertisement
Add Comment
Please, Sign In to add comment