Help with jQuery to disable input fields using select options

Hey guys,

I’m having trouble getting some jQuery to work and was wondering if someone could help me out. I’ve got a select with two options and 3 input fields as you can see from the jsfiddle file below.

http://jsfiddle.net/x5mfX/1/

What I’d like to do is have some jQuery which when ‘option1’ is selected, then all three input fields (data1, data2 and data3) become disabled and a class of ‘disabled’ is added to all three of them. However if ‘option 2’ is selected, then all three data fields remain the same and data can be inputted into them.

Thanks in advance.

See the following jsFiddle link for a working version of what you need the drop down to accomplish.