Jquery Remove input with value x

input, jquery

Solution

Loop into the `<input>` fields then match each values, if match, then remove it:

$(document).ready(function() {
    $('input[type=text]').each(function() {
        if ($(this).val() === "foo") {
            $(this).remove();
        }
    });
});​

Demo here jsFiddle.

Problem

Guys how can i remove an input with a specific value using jquery? I know i should user `.remove()` but i don't know how to find the specific input.

Original source