Joseph Walker Joseph Walker - 14 days ago 6
jQuery Question

How to remove <input> element inside another a list element?

How to remove

<input>
element inside another a list element? For example,

<li>
<p>
<input type='checkbox'></input>
<strong>test number</strong>
test information
</p>
</li>


I only need to remove
<input></input>
and everything else remain the same.

Super Thanks,
Joe

Answer

Try this:

$("li input").remove();

You may want to make your selectors more specific than that obviously.

More info on remove()