If you want use custom attributes in any tag than you can use it like this example . You need to define a the tag and in this tag. use a data attributes .
    
       
      
      
    

    
    
 <input type="text" id="custom" name="" value=""
  data-custom="your data " >
 <button type="button" onclick="alert($('#costume').attr('data-custom'));">Display Data</button>
 

Here data attribute you can use it for get data.