Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Compact $.fn.each a bit

It's a bit simpler now, as per this suggestion by @staabm:
madrobby#632 (comment)
  • Loading branch information...
commit 7aeb12bd61721253425d6979e4b2cedd75287441 1 parent 4d69f67
@mitio authored
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/zepto.js
View
5 src/zepto.js
@@ -350,10 +350,7 @@ var Zepto = (function() {
})
},
each: function(callback){
- emptyArray.every.call(this, function(el, idx){
- if (callback.call(el, idx, el) === false) return false
- else return true
- })
+ emptyArray.every.call(this, function(el, idx){ return callback.call(el, idx, el) !== false })
return this
},
filter: function(selector){
Please sign in to comment.
Something went wrong with that request. Please try again.