For some reason, the following bit of code isn't behaving as I would anticipate -- likely due to a misunderstanding on my end as to how it should behave.
var contentPane = widget.children("div.content").first();
var success = function (content) {
return function (data, successCode, httpRequest) {
content.innerHTML = data;
};
}(contentPane);
I've attached my debugger (well, Firebug anyway) and it looks like 'content' on the line content.innerHTML = data;
is the Window object, when I should be the result of var contentPane = widget.children("div.content").first();
, correct?
Note that if I set a breakpoint before the function, contentPane is indeed set to what I would expect (a jQuery object matching div.content
). Whats going on here, what am I missing?