I have a dynamic list and need to select the before last item.
&l
Probably a neater way but how about:
var lastLiId = $(".album li:last").prev("li").attr("id");