I want to link a callback to each input (type text) with class 'liveVariable':
$(".liveParameter").keyup(function(){
var callBackString= 'skp:change-'+$(this).attr('id')+'@'+$(this).attr('value');
window.location = callBackString;
});
However, this gives me a strange error. The value passes is the initial value of the input field (every time the event is fired).
I don't understand why this doesn't work. I dont think I have a closure, the local variable callBackString is created in the called function. So it should be created every time over?
How can I solve this in an elegant manner? (I would not like to create a call for each input field, cause I have many live parameters..)
$(this).attr('value')to$(this).val()$(this).attr("id")tothis.idthis.id? :)$looks so pretty! xD