Quantcast
Channel: How can I select the element prior to a last child? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by David Allen for How can I select the element prior to a last child?

Unless you can label that element with a class at the server side, you are better to use jQuery.jQuery(document).ready(function () { $count = jQuery("ul li").size() - 1; alert($count); jQuery("ul...

View Article



Answer by BoltClock for How can I select the element prior to a last child?

You can use :nth-last-child(); in fact, besides :nth-last-of-type() I don't know what else you could use. I'm not sure what you mean by "dynamic", but if you mean whether the style applies to the new...

View Article

How can I select the element prior to a last child?

I am looking for a CSS selector that lets me select the penultimate child of a...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images