remove img tag using .remove() attribute jquery
<p>I am attempting to remove a <code>&lt;img&gt;</code> tag from a function using its <code>id</code> with <code>.remove()</code> attribute but it doesn't work. You can find a simple code of what I am doing below:</p>

<pre><code>&lt;script&gt;
function verify(img)
{
   if(/*somecondition*/)
   removetag_setother();
   else
   //do something
}
function removetag_setother()
{
   $("#1").remove();
   text="&lt;p&gt;hello&lt;/p&gt;";
   $("body").append(text);
}
&lt;/script&gt;
&lt;body&gt;
&lt;img id="1" onclick="verify(this)" src="image1.png"&gt;
&lt;/body&gt;
</code></pre>

<p>Reviewing the console logging I got this message:
<strong>ReferenceError: $ is not defined</strong></p>
