You need to use the index function. There are two ways of calling this.
If all the elements are siblings
If all the elements are siblings of the same parent element and there are no other elements within that parent, you can use $(this).index().
When index is called without any parameters, it gets the element's position among its siblings. So the first child of the parent will be 0, the second 1, etc.
If the elements aren't all siblings
If the document structure is more complicated, then you'll have to search among a particular set. This means taking a selection of all the elements that you want to search among, and then passing the element you want to search for as the first parameter. It's exactly as if you were doing an indexOf search on an array.
var inputs = $("input").on("click", function(){
console.log(inputs.index(this));
});