Hey,
Not sure if this is the right section, but I am currently running a wordpress loop for the search page. It displays the results in two different templates.
One of the templates I want to apply a clear both to the second one.
Link:
http://admiretheweb.com/?s=the
The loop works like so.
Get posts, if in cat xx show in template a else show the rest in template b.
Templates b needs a clear on the second div, I did this by the following:
Code:
$(document).ready(function() {
$("#article-inspir:nth-child(2n)").append("<div style='clear:both;'></div>");
});
I've tried wrapping the div different quote styles, but it's not selecting the nth-child and applying the clear.
E.g:
Code:
$(document).ready(function() {
$("#article-inspir:nth-child(2n)").append("<div style="clear:both;"></div>");
});
Code:
$(document).ready(function() {
$("#article-inspir:nth-child(2n)").append('<div style="clear:both;"></div>');
});
Why ?