Skip to content

Commit aa2291c

Browse files
committed
fixed issue 51
1 parent 1d3c7a2 commit aa2291c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/jquery.columnizer.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,11 @@
166166
if($pullOutHere.children().length){
167167
$cloneMe = $pullOutHere.children(":first");
168168
$clone = $cloneMe.clone(true);
169-
if($clone.prop("nodeType") == 1 && !$clone.hasClass("dontend")){
169+
//
170+
// need to support both .prop and .attr if .prop doesn't exist.
171+
// this is for backwards compatibility with older versions of jquery.
172+
if(($clone.prop && $clone.prop("nodeType") == 1 && !$clone.hasClass("dontend")) ||
173+
($clone.attr("nodeType") == 1 && !$clone.hasClass("dontend"))){
170174
$putInHere.append($clone);
171175
if($clone.is("img") && $parentColumn.height() < height + 20){
172176
$cloneMe.remove();

0 commit comments

Comments
 (0)