Created
August 7, 2013 21:53
-
-
Save peterkinmond/6179124 to your computer and use it in GitHub Desktop.
With jQuery in noConflict mode, Zepto is no longer assigned to $. We ran into this issue while running our own js which included a noConflict version of jQuery on a publishers page which already included zepto.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html xmlns="http://www.w3.org/1999/xhtml"><head> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js" type="text/javascript"></script> | |
<script> | |
$.noConflict(true) | |
</script> | |
<script src="http://zeptojs.com/zepto.js" type="text/javascript"></script> | |
</head> | |
<body> | |
With jQuery in noConlict mode, Zepto is no longer assigned to $. | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Curious why you're using jquery and zepto on the same page. Why not just a custom build of jQuery 2.0 that allows for smaller file sizes, works on all modern browsers, and has 1:1 jQuery compat?