Everything above nth child

gertystorrud

New Member
I am trying to select everything above a certain child, I have tried using gt: and slice yet can't get it to work. It has to be a selector which gets everything after a specific child, rather than removing the first child specifically. At the moment it is only taking out the second column, I need everything including and after the second column.The line in question is:\[code\]var myColumn = $('.partnerGroupContent > :nth-child(2)')\[/code\]Here is the fiddle:http://jsfiddle.net/kL3c8/20/\[code\]<div class="partnerGroupContent group"> <div class="column"> <div class="sponsor">1</div> <div class="sponsor">2</div> </div> <div class="column"> <div class="sponsor">3</div> <div class="sponsor">4</div> </div> <div class="column"> <div class="sponsor">5</div> <div class="sponsor">6</div> </div> <div class="column"> <div class="sponsor">7</div> <div class="sponsor">8</div> </div></div>var rowCount = 2var myColumn = $('.partnerGroupContent > :nth-child(2)')if (rowCount == 2) { $('.partnerGroupContent').after( $('<div>', { 'class': 'partnerGroupContent2' }).append(myColumn))$('.partnerGroupContent').cycle();$('.partnerGroupContent2').cycle();}\[/code\]
 
Back
Top