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

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -