1
I want when I select, for example, the option Ches
replaces where it is NOME
automatically in HTML.
.goleiro-1 {
height: 70px;
width: 70px;
background-color: #fff;
border-radius: 50%;
box-shadow: 0 4px 1px 0 rgba(0,0,0,.5);
margin-left: 42%;
margin-top: 25px;
float: left;
position: relative;
}
.s_goleiro-1 {
float: left;
margin-left: 38%;
margin-top: 5px;
position: relative;
border: none;
border-radius: 4px;
padding: 6px;
font-size: 16px;
}
<img class="goleiro-1" src="http://meusite.com/avatar.php?user=NOME" data-toggle="tooltip" data-placement="top" title="Goleiro">
<select class="s_goleiro-1" name="goleiro">
<option value="PetCech">PetCech</option>
<option value="Ches">Ches</option>
<option value="Drionn">Drionn</option>
<option value="TPB">TPB</option>
</select>
</div>
It seems to me that the intention was not to change the
title
image, only thesrc
.– Sam
@Sam This is just for the boy who asked the question can see it working ;)
– LeAndrade
It worked perfectly, but I have 3 other fields in the form: defender-1, half-1, striker-1. How do I for all?
– Thiago Vinícius
@Thiagovinicius had to have informed this in the question, now it was rs... unless Douglas here wants to reformulate the answer, but the question has already been answered.
– Sam
Ah, what a pity then :/
– Thiago Vinícius
@Thiagovinicius I will make an answer and send you.
– Sam
Okay, thank you very much
– Thiago Vinícius
Taí: https://jsfiddle.net/34s15xvh/ .... note that there has been a change in CSS to be generic and HTML has added classes "avatars" and "players".
– Sam
Thanks a lot, Sam. It worked out just fine.
– Thiago Vinícius