How to find input element id by value?

Posted by Abs on Stack Overflow See other posts from Stack Overflow or by Abs
Published on 2010-05-05T10:53:49Z Indexed on 2010/05/05 10:58 UTC
Read the original article Hit count: 145

Filed under:
|

Hello all,

How do I get the id of an input element based on its value? The values will always be unique and there are only 7 of them. I have tried this:

$('#wrapper').find("input[value='"+value+"']").each(function(){

            return this.id;

});

But nothing is returned!

Thanks all for any help

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jQuery