I got multiple input types in my form based on positions.
<input type="file" name="file" id="file" data-positionid="<?php echo $positionId; ?>" class="inputfile" />
Now i want on change the correct data-positionid to show. If i got multiple positions the jQuery i got responds only to the first every time.
$('input[type=file]').change(function () {
var positionId = $(this).data('productid');
alert(positionId);
});
So i think that $(this) is not realy getting the changed input type.