Multiple-non-native select
value .val()
in jQuery Mobile returns an array. The .length
of that array represents total chosen options. Multiple .length
by 0.5
to get final value.
$(document).on("pagecreate", function () {
$("#top").on("change", function () {
if ($(this).val() != null) {
console.log($(this).val().length * 0.5 + " USD");
} else {
console.log("No toppings.");
}
});
});