Guest User

Untitled

a guest
Oct 18th, 2017
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. <script async type="text/javascript" src="js/jquery-1.12.3.min.js"></script>
  2.  
  3. <script type="text/javascript">
  4. jQuery(document).ready(function() {
  5. App.init();
  6. OwlCarousel.initOwlCarousel();
  7. FancyBox.initFancybox();
  8. StyleSwitcher.initStyleSwitcher();
  9.  
  10. });
  11. </script>
  12.  
  13. <script async id="jquery" type="text/javascript" src="https://code.jquery.com/jquery-2.2.3.js"></script>
  14. Then I call a script using jquery :
  15.  
  16. <script type="text/javascript">
  17. document.getElementById('jquery').addEventListener('load', function () {
  18. App.init();
  19. OwlCarousel.initOwlCarousel();
  20. FancyBox.initFancybox();
  21. StyleSwitcher.initStyleSwitcher();
  22. });
  23. </script>
  24.  
  25. <script async type="text/javascript" src="path_to_jquery"
  26. id="jquery_script_tag"></script>
  27. <script>
  28. if ( !('jQuery' in window) )
  29. {
  30. window.jQueryQueue = [];
  31. window.jQuery = function(){
  32. jQueryQueue.push( arguments );
  33. }
  34. document.getElementById('jquery_script_tag').addEventListener('load', function(){
  35. for ( var i in jQueryQueue )
  36. jQuery.apply( document, jQueryQueue[i] );
  37. });
  38. }
  39. </script>
Add Comment
Please, Sign In to add comment