I want to pass in arguments into an onClick function, but it keeps firing on return. I believe I need to bind the click handler, but I am not exactly sure how to do that.
function (phone_calls, right_side, before_children) {
function test (blah){
console.log(blah)
}
return boxy(
"Phone Calls",
_.map(phone_calls, function(a) {
return d("div.splitter-wrap", {onClick: test("testarg")}, [
d("table.splitter", { className: name}, d("tr",
[d('td',a.date),d('td',a.number)]
))
]);
}),
this.test.bind(this, 'testarg').