Question: I have custom attribute tag in my html without id as the number can vary for them

```
<input type="hidden" cus_control="offer_1" value="123456">
<input type="hidden" cus_control="offer_2" value="1UYREST">

```

Now I want to read the value of offer\_1 and offer\_2 which is 123456 and 1UYREST respectively using jquery or javascript.
How will I achieve this as I don't have id for them?

Answer: 
You can target the attribute it self

```
var value = $('input["cus-control=offer_1"]').val();

```

Note that you should be using data-attributes, and not invalid custom attributes
I finally found a way.

```
var hiddenElements = $( "body" ).find( "input:hidden" ).not( "script" );
hiddenElements.each(function(){
      if($(this).attr('sfc_control'))
      {
          var control_value = $(this).val();
          var control_name = $(this).attr('cus_control');
      }

    });

```

Thanks for the suggestions