How to toggle elements in and out of DOM using jQuery detach() method?

后端 未结 4 2103
-上瘾入骨i
-上瘾入骨i 2020-12-11 08:29

I have a group of divs arranged in a grid.

To style each div I\'m selecting them with the nth-child() pseudo-class.

div.tile:nth-child(4n-7)         


        
4条回答
  •  庸人自扰
    2020-12-11 08:40

    I'm not very sure if this what you'd like to do - http://jsfiddle.net/tfyfpbb2/1/

    If so, you just need to add three row classes instead of one. This way each row has it's own "space" and will not miss up the next row's styling.

    01
    02
    03
    04

    Hope that helps! Let me know if that's not what you wanted and I can edit my answer.

提交回复
热议问题