I have this script:
$(document).on('click', '.tipo-sangre', function(event){
var tipo = $(this).data("sangre");
$(tipo).appendTo("#tipo_sangre");
});
What I want is to give clik me pass the value of the var to a hidden type input to be able to make the request and save it in the database but I do not know how to send it to the input by the way the inpout is the id= #tipo_sangre
as I could do so that the var is saved in it and be able to send it with request