This repository was archived by the owner on Apr 12, 2022. It is now read-only.
This repository was archived by the owner on Apr 12, 2022. It is now read-only.
Prevent first option topOptionText from being clickable #14
Open
Description
To prevent the first option from being clickable I'd like to suggest the following addition of a function and a slightly change of code.
New function:
//function to create first option in the select menu
function createFirstOption($container){
$('<option selected="selected" disabled="disabled" value="0">'+settings.topOptionText+'</option>').appendTo($container);
}//createFirstOption()
Within the function createSelect() use instead of
//create default option if the text is set (set to null for no option)
if(settings.topOptionText){
createOption($('<li>'+settings.topOptionText+'</li>'), $select);
}
the code
//create default option if the text is set (set to null for no option)
if(settings.topOptionText){
createFirstOption($select);
}
Metadata
Metadata
Assignees
Labels
No labels