views:

47

answers:

0

I have to validate my code for IE, I'm trying to use jQuery. The second line works perfectly (although if I add the first line, it breaks [only in IE; works fine in other browsers]). This whole snippet works in other browsers.

$("ul#nav > li:nth-of-type(1n+4)").css("marginTop", "4px");
$("#templates > :nth-child(3n+5)").css("margin", "15px 75px");

So yeah, the second line works only if the first line isn't there. This code is at the bottom of the page.