Skip to content

Instantly share code, notes, and snippets.

@peterkinmond
Created August 7, 2013 21:53
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 peterkinmond/6179124 to your computer and use it in GitHub Desktop.
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
<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>
@jdalton
Copy link

jdalton commented Aug 9, 2013

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment