Take a look on this code, what I wrote: http://pastebin.com/TZpUAWpA, and this jQuery, what is basically copy pasted from jquery docs: http://pastebin.com/Ecu0T5Kv
The problem is that, I want to make so, that every <p class="java"></p> shows selected value of previous select box.
At the moment, it works only for the bottom one, and bottom selected value applies to all <p> tags.
This does work, hope that its what you are looking for:
FIDDLE