In the learn jQuery section on variables


Hi, so I am having trouble with the variable section in the learn jQuery area.

I need to target the 4th child of ol. what I have tried is

$(document).ready(function() {

var $target = li:nth-child(3); //also have tried li:nth-child(4)



$(document).ready(function() {
var a12 = document.getElementsByTagName('ol')

var $target = a12.childNodes[3]


none of this is working, and I am confused as to why not. Any help is appriciated



Should be the result of a jQuery selector:

var $target = $('ol li:last');


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.