Make sure that when multiple variables are being declared that assignments are each done on their own line.

This commit is contained in:
John Resig 2010-11-09 11:09:07 -05:00
parent b5b3c73db3
commit fb48ae8e6c
12 changed files with 98 additions and 45 deletions

View file

@ -10,7 +10,8 @@ var runtil = /Until$/,
jQuery.fn.extend({
find: function( selector ) {
var ret = this.pushStack( "", "find", selector ), length = 0;
var ret = this.pushStack( "", "find", selector ),
length = 0;
for ( var i = 0, l = this.length; i < l; i++ ) {
length = ret.length;
@ -59,7 +60,9 @@ jQuery.fn.extend({
var ret = [], i, l, cur = this[0];
if ( jQuery.isArray( selectors ) ) {
var match, matches = {}, selector, level = 1;
var match, selector,
matches = {},
level = 1;
if ( cur && selectors.length ) {
for ( i = 0, l = selectors.length; i < l; i++ ) {
@ -225,7 +228,9 @@ jQuery.extend({
},
dir: function( elem, dir, until ) {
var matched = [], cur = elem[dir];
var matched = [],
cur = elem[ dir ];
while ( cur && cur.nodeType !== 9 && (until === undefined || cur.nodeType !== 1 || !jQuery( cur ).is( until )) ) {
if ( cur.nodeType === 1 ) {
matched.push( cur );