jQuery remove option from select list where variable has spaces -
On my page, when the user clicks on the 'Delete' button, an item from a selected list Matches has been deleted and DOM has been updated. It works fine unless there is no place in the variable.
$ ('option [value =' + popup select ''] '). Remove ();
If popupSelect = nospaces will work.
If Popup SELECT = is empty it will not work and I will get the following console error:
Unwanted error: syntax error, unrecognized expression : The option is [value = is empty]
I have tried everything like a bidding system, but nothing seems to work
<
Popup select + '"]'). Remove ();
Comments
Post a Comment