JSFiddle : http://jsfiddle.net/veksen/7TRgE/1/
If I call the variable value from inside my function, it works. However, it doesn't if I call it outside of the function.
I feel like it has something to do with change, as it is first assigned ok, but won't change.
var diff_res = { norm:0, nm:-40, hell:-100 };
var difficulty = "hell";
$("select").change(function () {
difficulty = $("select option:selected").val();
$(".inside").text(diff_res[difficulty]);
})
.change();
var char_fr = 30;
char_fr += diff_res[difficulty];
$(".outside").text(diff_res[difficulty]);