I want to change the type of an input on click of a button but it doesn't work. I tried this:
$('.addPhoto').click(function(){
$(this).siblings('.auto_image').prop("type", "file");
});
It doesn't do anything at all. I searched on google and came across this: change type of input field with jQuery
It says it is possible to do it with straight DOM, but how would I select the class of a sibling with DOM?