Created
August 30, 2016 09:15
-
-
Save koentjuh1/cb08616e7f014474f0503ca19a2aa85a to your computer and use it in GitHub Desktop.
product list line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(".item-list .item").each( function (index) { | |
index += 1; | |
// als er 4 items zijn voeg html toe. | |
if(index % 4 === 0) { | |
$(this).after('<div class="col-xs-12 line line-3"></div>'); | |
} | |
// als er 3 items zijn voeg html toe. | |
if(index % 3 === 0) { | |
$(this).after('<div class="col-xs-12 line line-3"></div>'); | |
} | |
// als er 2 items zijn voeg html toe. | |
if(index % 2 === 0) { | |
$(this).after('<div class="col-xs-12 line line-2"></div>'); | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment