Remove li from ul jQuery
<p>I have a list with id's that may contain spaces. I have used two approaches to remove an li(by id) from ul :</p>

<pre><code> var element = document.getElementById(&lt;name_of_id&gt;);
 $(element).remove();

 var element = document.getElementById(&lt;name_of_id&gt;);
 element.parentNode.removeChild(element);
</code></pre>

<p>Neither of them works! Please help</p>

<p>Here is my html :</p>

<pre><code> &lt;li value='A 1' id='A 1'&gt;&lt;/li&gt;
</code></pre>