I am trying to pass an argument single into a preexisting function in javascript with bind().
var connect = function(index) {
console.log(this.single);
...
}
var connect_fn = connect;
connect_fn.bind({
single: true
});
$(".box").each(connect_fn);
Unfortunately, in the console.log() this.single is undefined.