Fiddle me this:
http://jsfiddle.net/TrySpace/QZMP6/17/
After editing the input field, the html updates on each element, but I want to reenable/restore the click event..
I tried making the click event an external function, but I can’t seem to get the ‘this’ to work properly/communicate with the function…
Can’t seem to find good explanations how to pass events to functions…
As you can see in the fiddle, I try to do:
$(this).on("click");
But off-course it defines nothing so it won’t work, so I’ll have to re-call/re-assign the whole function.?
You can define the function as a variable. That way you can just reference it in the click handler by its variable name:
http://jsfiddle.net/QZMP6/25/