I used to have a text input at #element_3, where you may type in a number, and a function is run on that number, and the results are outputted dynamically to parts of the page.
I’ve changed that text input into a dropdown menu, but I don’t know what to change in my JS code so that it works. I hope I’ve explained enough.
Here’s my code – http://slexy.org/view/s2cwHc5do2
Bold
It seems my problem lies in this line:
$('#element_3').bind('keydown keyup keypress', calcPrice);
It would run the function when something was typed in, hence the keydown keyup keypress. But how do I make it work if there is no typing, but just a select element?
check out the jquery docs on change, they use the .change() function when a select has a value changed
http://api.jquery.com/change/