-1

I have an unsorted list with inputs. I am wondering how I can remove an input from the list provided specific id of the input. Here is the sample list:

     <ul class="list>
        <li class="item"><input class="child" id"1" type"checkbox" name ="checkbox">"test 1"</li>
        <li class="item"><input class="child" id"2" type"checkbox" name ="checkbox">"test 2"</li>
        <li class="item"><input class="child" id"3" type"checkbox" name ="checkbox">"test 3"</li>
    </ul>

This is not the same as the proposed solution as I have inputs involved inside the li and not just li directly

coder
  • 241
  • 5
  • 19
  • 1
    All you have to do is to query the `input` by id, then find it's closest `li` parent with jQuery, and remove it. See my answer below :-) – Ronen Cypis Feb 22 '17 at 14:30
  • it is not a duplicate – coder Feb 22 '17 at 14:45