Differences between jQuery and zepto
by wheresrhys
HTML
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/zepto/1.0/zepto.min.js"></script>
<div>
</div>
JavaScript
var theZ = Zepto(document),
theJ = jQuery(document),
output = '<h1>Differences between jquery 2 and zepto</h1>';
output += '<h2>Extra props on the jQuery root object</h2>';
output += '<ul>';
for (var key in jQuery) {
if (!Zepto[key]) {
output += '<li>' + key + '</li>';
}
}
output += '</ul>';
output += '<h2>Extra props on jQuery instances</h2>';
output += '<ul>';
for (var key in theJ) {
if (!theZ[key]) {
output += '<li>' + key + '</li>';
}
}
output += '</ul>';
$('div').html(output);