1
I have 2 Divs and when I click inside a link inside the 1st div I need to get the value of the 2nd div, how do I do this?
HTML:
<div class="vei">
<span class="download"><a target="_blank" href='teste2.php'>download</a></span>
</div>
<div class="titulo"><a target="_blank" href='teste.php'>Teste</a></div>
JS (I tried this but it didn’t work):
$( ".download a" ).click(function(e){
$( ".download a" ).html($( ".titulo a" ).text(););
});
The "a" has to become "Test" and no more "download"!
See if it helps you: http://www.w3schools.com/jquery/jquery_ref_traversing.asp
– Taisbevalle