How could I get the second last elment?
Hi,
how could I select a html-element before :last-child?
I have an script like:
- var lastelm = $('div.lof-main-item:last-child'),
buttonnext = $('a.next'),
buttonprev = $('a.previous');
$(buttonnext).click(function() {
if (lastelm.css('opacity') === '1') {
$(buttonprev).show();
};
});
But I don´t need the lst-child but the one before last.
Best regards