I need to remove element that have value="123"
. I know that all elements with different values are located into #attached_docs
, but I don't know how to select element with value="123"
.
$('#attached_docs').find ... .remove();
Can you help me?
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();