a neat way of building an incremental price with jquery/javascript ?
I have a site where a product has a basic price, which is potentially customised by several options, each of which is chosen from a select list.
I would like to have a field/label which is updated via jquery or javascript whenever an option is chosen, so that before the customer adds an item to the cart, they can see how much the customised product will cost.
My select lists are each populated from a recordset, and use their respective ID as ID, and description as a value.
(I can append the value string in the select list with a price).
Using jquery, I can use the syntax var val1 = $("#selectoptioncolour").val(); to retrieve the select ID and var val1a = $("#selectoptioncolour :selected").text(); as its description, but is there an easy way to get the price for the selected option, other than trying to extract a substring from the description ?