Skip to content

Instantly share code, notes, and snippets.

@mijabi
Last active August 29, 2015 14:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mijabi/93734d46b70c30936536 to your computer and use it in GitHub Desktop.
Save mijabi/93734d46b70c30936536 to your computer and use it in GitHub Desktop.
(良くないけど)ページに複数のjQueryを読み込む。 ref: http://qiita.com/mijabi/items/c68d27bc2ea5642675af
<script src="//code.jquery.com/jquery-1.6.2.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script>
jQuery('<div id="hoge" style="font-size: 100px;">HOGE</div>').prependTo('body');
jQuery('#hoge').slideToggle(2000, 'easeOutExpo');
</script>
<script>
var jq162 = jQuery.noConflict(true);
jQuery('<div id="hoge" style="font-size: 100px;">HOGE</div>').prependTo('body');
jQuery('#hoge').slideToggle(2000, 'easeOutExpo');
</script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="//code.jquery.com/jquery-1.7.2.js"></script>
<script src="//raw.githubusercontent.com/kswedberg/jquery-smooth-scroll/master/jquery.smooth-scroll.js"></script>
<script src="//code.jquery.com/jquery-1.6.2.js"></script>
<script>
jQuery('<div id="hoge" style="font-size: 100px;">HOGE</div>').prependTo('body');
jQuery('#hoge').slideToggle(2000, 'easeOutExpo');
jQuery('<div id="hoge" style="padding-top: 2000px;"><a href="//google.com" id="google">google</a></div>').appendTo('body');
jQuery('<div id="fuga"><a href="#google" id="yahoo">yahoo</a></div>').prependTo('body');
jQUery.smoothScroll();
</script>
<script>
var jq000 = jQuery.noConflict(true);
console.log('jQuery = ' + jQuery.fn.jquery);
console.log('jq000 = ' + jq000.fn.jquery);
// jQuery = 1.7.2
// jq000 = 1.6.2
</script>
<script>
var jq162 = jQuery.noConflict(true);
var jq999 = jQuery.noConflict(true);
console.log('jQuery = ' + jQuery.fn.jquery);
console.log('jq162 = ' + jq162.fn.jquery);
console.log('jq999 = ' + jq999.fn.jquery);
// jQuery = 1.10.2
// jq162 = 1.6.2
// jq999 = 1.7.2
</script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<!--script src="//code.jquery.com/jquery-1.7.2.js"></script-->
<script>
var jq000 = jQuery.noConflict(true);
jQuery('<div id="hoge" style="font-size: 100px;">HOGE</div>').prependTo('body');
jQuery('#hoge').slideToggle(2000, 'easeOutExpo');
// X Uncaught TypeError: undefined is not a function
</script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<!--script src="//code.jquery.com/jquery-1.7.2.js"></script-->
<script>
var jq000 = jQuery.noConflict(true);
jq000('<div id="hoge" style="font-size: 100px;">HOGE</div>').prependTo('body');
jq000('#hoge').slideToggle(2000, 'easeOutExpo');
</script>
<script>
var jq000 = jQuery.noConflict(true);
jQuery = jQuery || jq000;
jQuery('<div id="hoge" style="font-size: 100px;">HOGE</div>').prependTo('body');
jQuery('#hoge').slideToggle(2000, 'easeOutExpo');
</script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script>
var jq162 = jQuery.noConflict(true);
jQuery('<div id="hoge" style="font-size: 100px;">HOGE</div>').prependTo('body');
jQuery('#hoge').slideToggle(2000, 'easeOutExpo');
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment