ドキュメントのサンプルをみると、jQuery.each関数は
function callback(indexInArray, valueOfElement) { var booleanKeepGoing; this; // == valueOfElement return booleanKeepGoing; // optional, unless false // and want to stop looping }
function callback(elementOfArray, indexInArray) { var shouldKeepIt; this; // unmapped return shouldKeepIt; }
って書いてあって、「なんだー、ドキュメント間違ってんじゃんー、まさか、引数の順番が変わるわけねーべ」とか思ってたら、本当にドキュメントの通りの順番でした\(^o^)/
20分くらいはまったぜ。ちなみに、jQuery.map関数はgrepと同じ順番。
意図があってやってるのかな。