Posts

Showing posts with the label select

Get the second last child of an element in CSS

In order to query the second last child of a HTML element in CSS, you can just simply use this: .my-menu:nth-last-child(2) assuming .my-menu is the class name of the parent node.

Sorting select options in alphabet order

Pretty handyyyy: Reference: http://stackoverflow.com/questions/12073270/sorting-options-elements-alphabetically-using-jquery