I have read this tutorial tuto
i'd like to use the attribut data-
in a hypertext link:
<a href="#" onClick="openbox2('Validation de concept technique', 1)" data-arr="@fa.Id_element" id="lien">Donner votre avis</a>
in the javascript part:
function openbox2(formtitle, fadin) {
var self = $(this);
var arr = self.data('arr');
alert(arr);
}
i get always the same alert message undefined
.
What is the reason of this problem? How can i fix it?