when i select only the first dropdown, the result in #output showing NaN?
http://jsfiddle.net/boyee007/TJcP4/
i want, if the first dropdown is selected is showing 30 then if both selected will calculate the both value
<select id="t_dermal_name">
<option value="1" rel="30">Between Eyebrows</option>
<option value="7" rel="30">Individual Line Softening</option>
<option value="2" rel="30">Lip Contouring</option>
</select>
<select id="t_wrinkle_name">
<option value="1" rel="30">Between Eyebrows</option>
<option value="7" rel="30">Individual Line Softening</option>
<option value="2" rel="30">Lip Contouring</option>
</select>
var output = 0;
var output1 = 0;
if($("#t_dermal_name").val() != 0){
enter code here`output = $("#t_dermal_name").find('option:selected').attr('rel');
}
if($("#t_wrinkle_name").val() != 0){
output1 = $("#t_wrinkle_name").find('option:selected').attr('rel');
}
$("#output").html(parseInt(output) + parseInt(output1));