I have a problem getting data from a javascript data
In the html I have the following line
<span id="internet-compl" class="internet-item" data-precio="${empty elem.extraVl?0:elem.precio }" data-cantidad="1" data-vel="${elem.velocidad}" data-promo="${elem.tienePromoMensual}" data-descpromo="${elem.promo.nombrePromocion}">${elem.titulo}</span>
and in the java script I have the following
var promo = $("#internet-compl").html($(this).data("promo"));
console.log(promo);
The problem is that instead of getting only the string that I assign to the data I get the whole HTML element as shown below
Someone has an idea that I'm doing wrong
Note there is no error in the part of assigning elem.tienePromoMensual that is an object that I am extracting with JSTL