Is it possible to have two elements with the same data-attributes?
HTML
<div id="cerchi" class="container">
<div class="row">
<div class="col_6 clearleft">
<div class="blu" data-link="nadir.php">
<p>1</p>
</div>
</div>
<div class="col_6 omega">
<div class="arancione" data-link="sole.php">
<p>2</p>
</div>
</div>
</div>
</div>
JS
$("#cerchi .col_6 > div").click(function(){
alert($("#cerchi .col_6 > div").data("link"));
});
If yes, why if I click on the second "div" the alert gives the result "nadir.php"? instead of "sole.php"? do i something wrong?
Thanks in advance