How to find elements with 'value=x'?
If the value is hardcoded in the source of the page using the value
attribute then you can
$('#attached_docs :input[value="123"]').remove();
If you want to target elements that have a value of
EDIT works both ways ..123
, which was set by the user or programmatically then use
or
$('#attached_docs :input').filter(function(){return this.value=='123'}).remove();
demo http://jsfiddle.net/gaby/RcwXh/2/
Use the following selector.
$('#attached_docs [value=123]').remove();
Value exactly equal to 123:
jQuery("#attached_docs[value='123']")
Full reference: http://api.jquery.com/category/selectors/