So I have a page I want to apply some CSS to, but it is dynamically generated by the CMS. The URL remains constant, so I thought I could stick this in the head of the template file to add the CSS to the page I want, but it's not working.
<script type="text/javascript">
jQuery(document).ready(function () {
if(window.location.href.indexOf("/products.html"))
{
document.write("<style type=\"text/css\">
.category-grid li:nth-child(4)
{
margin-left:115px;
}
</style>");
}
});
</script>
There's probably some syntax off on my document.write
statement, as that's where the error seems to occur, but I can't figure it out. Any ideas?