I have this segment of code, I would like someone to help me in transforming the variable P
(in which it takes the attribute 'value') and transform it into number value for the sum.
$(document).ready(function(e) {
$('.pizzadisponivel').click(function(e){
$(this).toggleClass('pizzaselecionada');
var P = $('label').attr('value');
Total+= P;
$("#teste").html('R$' + Total);
alert(Total)
});
var Total = 0;
});