How can you use the :contain() on an input field, e.g.
#inputfield contains a dynamic value of 5.938 and I want to use $("#inputfield:contains('5.938')").
But that won't work, I've provided a demo at jsFiddle.
I don't want to use if(element.val() == '5.938') because I need a provisional selector instead doing an if/else statement.
I also don't mean by using [value=5.938] because the value will change.
:contains()doesn't work simply because it's not intended for use with thevalueattribute. Do you need to do stuff anytime the input's value becomes5.938?