selectnav.js – how to set default title

selectnav.js is a handy jquery tool used for transforming a <ul> list into a select menu. Generally for a resonsive mobile friendly view.

Available here:

By default it has an empty title which can be a little confusing for users. To give the menu a title do the following…

Find the following code in your selectnav.min.js file

<select id="'+l(!0)+'">

Add the following directly afterwards, without whitespace.

<option disabled="disabled" selected="selected">Choose one</option></select>
0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published.