Skip to content

Commit 0f24a3d

Browse files
committed
using === to compare to 0
1 parent 139db23 commit 0f24a3d

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/jquery.columnizer.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@
150150
}
151151
$putInHere.append(node);
152152
}
153-
if($putInHere[0].childNodes.length == 0) return;
153+
if($putInHere[0].childNodes.length === 0) return;
154154

155155
// now we're too tall, so undo the last one
156156
var kids = $putInHere[0].childNodes;
@@ -278,7 +278,7 @@
278278
// split class and move on.
279279
$cloneMe.addClass(prefixTheClassName("split"));
280280
}
281-
if($clone.get(0).childNodes.length == 0){
281+
if($clone.get(0).childNodes.length === 0){
282282
// it was split, but nothing is in it :(
283283
$clone.remove();
284284
}
@@ -323,7 +323,7 @@
323323
var kid = $destroyable[0].childNodes[0];
324324
if(kid.attributes){
325325
for(var i=0;i<kid.attributes.length;i++){
326-
if(kid.attributes[i].nodeName.indexOf("jQuery") == 0){
326+
if(kid.attributes[i].nodeName.indexOf("jQuery") === 0){
327327
kid.removeAttribute(kid.attributes[i].nodeName);
328328
}
329329
}
@@ -367,7 +367,7 @@
367367
}
368368
if(dom.nodeType != 1) return false;
369369
if($(dom).hasClass(prefixTheClassName("dontend"))) return true;
370-
if(dom.childNodes.length == 0) return false;
370+
if(dom.childNodes.length === 0) return false;
371371
return checkDontEndColumn(dom.childNodes[dom.childNodes.length-1]);
372372
}
373373

@@ -437,7 +437,7 @@
437437
// create the columns
438438
for (var i = 0; i < numCols; i++) {
439439
/* create column */
440-
var className = (i == 0) ? prefixTheClassName("first") : "";
440+
var className = (i === 0) ? prefixTheClassName("first") : "";
441441
className += " " + prefixTheClassName("column");
442442
var className = (i == numCols - 1) ? (prefixTheClassName("last") + " " + className) : className;
443443
$inBox.append($("<div class='" + className + "' style='width:" + (Math.floor(100 / numCols))+ "%; float: " + options.columnFloat + ";'></div>")); //"
@@ -475,7 +475,7 @@
475475
//
476476
// this results in empty columns being added with the dontsplit item
477477
// perpetually waiting to get put into a column. lets force the issue here
478-
if($col.contents().length == 0 && $destroyable.contents().length){
478+
if($col.contents().length === 0 && $destroyable.contents().length){
479479
//
480480
// ok, we're building zero content columns. this'll happen forever
481481
// since nothing can ever get taken out of destroyable.
@@ -505,7 +505,7 @@
505505
while($destroyable[0].childNodes.length > 0){
506506
var kid = $destroyable[0].childNodes[0];
507507
for(var i=0;i<kid.attributes.length;i++){
508-
if(kid.attributes[i].nodeName.indexOf("jQuery") == 0){
508+
if(kid.attributes[i].nodeName.indexOf("jQuery") === 0){
509509
kid.removeAttribute(kid.attributes[i].nodeName);
510510
}
511511
}
@@ -546,7 +546,7 @@
546546
}}($inBox));
547547

548548
var avgH = totalH / numberOfColumnsThatDontEndInAColumnBreak;
549-
if(totalH == 0){
549+
if(totalH === 0){
550550
//
551551
// all columns end in a column break,
552552
// so we're done here

0 commit comments

Comments
 (0)