just wondering how it's possible to un-select the select option box, i used .remove() but this actually removes the text from the select box,
is there any other way.
thanks
You can deselect any cells within the selected range with the Deselect Tool. Pressing the Ctrl key, you can click, or click-and-drag to deselect any cells or ranges within a selection. If you need to reselect any of those cells, continue holding the Ctrl key and reselect those cells (for Mac, use the Cmd key).
If you accidentally select an item from a list and need to remove it, hold down the CTRL button (on a Windows PC) or the Command button (on a Mac) and click on the item you want to uncheck. This will deselect the item and it will no longer be highlighted.
You can deselect options in a multi-value select list by ctrl-clicking it.
Dictionaries (Merriam-Webster and New Oxford American Dictionary) have deselect but not unselect. The NOAD defines deselect as “turn off (a selected feature) on a list of options on a computer menu”, which is what you want.
$('#mySelectBox :selected').attr('selected', '');
Where #mySelectBox is the id of your select element.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With