jquery p:last-child not working
I’m trying to add some data to my paragraphs, how ever it is only working for my first
I can make it put the data into my last
p by using
p:gt(0) but seems like I should be able to use
Any idea where I’m going wrong?
It’s because that
p element isn’t the last child. The
h2 elements is.
You could use
You could also use the
.last() method or the jQuery