I want to get condition in Z in the following situation.
Count every item, if display (count% 3 === 0) {ul.thumbnails} li.span6 // nested / under more code ny < Nested under / pre> I've searched a lot, but not with luck. Basically, I want to create a new list for every count which is divisible by 3
I tried this:
mixin display_list li / code Each item, Count in display -f (calculation === 0) ul Thumbnail Mixin Display_list - It's a Mixin display_list It still does not work! Jade forces you to induce nested content, I find the only way (not sure, but this is definitely the easiest) to do this:
- var I = 0; - While (i & lt; display.length) ul Thumbnail - var k = i + 3 - while repeating (i & lt; c & amp; i & lt; display.length) twice, as long as display.length isnL - i ++ < (This reply has been updated, the former answer was completely incorrect)
Em> Update 2: Fixed that K can be more than display.length
No comments:
Post a Comment