Is it possible? If not, is there a way to do it with jQuery?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Unfortunately it’s impossible.. Disregard this answer and look at spliters answer below.If it were to be possible, it would look something like…
But this doesn’t work, because + will select the immediate sibling after last-child (which is nothing, of course). There is no immediate previous selector.
There are different ways of achieving this with jQuery, the most performant would be…
http://jsfiddle.net/qkzdJ/