single
を使用して、javascript の既存の関数に引数を渡そうとしていbind()
ます。
var connect = function(index) {
console.log(this.single);
...
}
var connect_fn = connect;
connect_fn.bind({
single: true
});
$(".box").each(connect_fn);
残念ながら、console.log()
this.single
は定義されていません。