In jquery:
<script>
$( "#main article:nth-child(3) .postSnippet" ).css("display", "block");
</script>
How would you look in pure JS?
In jquery:
<script>
$( "#main article:nth-child(3) .postSnippet" ).css("display", "block");
</script>
How would you look in pure JS?
The selector stays the same, what changes is the way to go through the element (s) and apply the desired style. Example:
var e = document.querySelectorAll('#main article:nth-child(3) .postSnippet');
for (var i = 0; i < e.length; i++) {
e[i].style['display'] = 'block';
}
However, would not it be easier to add a style in your CSS to do this? Example:
#main article:nth-child(3) .postSnippet {
display: block;
}