Indeed. You put the bind on the wrong side of that parenthesis.
Sean McArthur On Nov 27, 2010 2:48 PM, "Perrin Perrin" <[email protected]> wrote: > You are trying to call bind on the return value of b.addEvent > > You need to call bind on your function instead. > > On Sat, Nov 27, 2010 at 3:50 PM, Dailce <[email protected]> wrote: > >> >> I tried this >> >> a.each(function (b) { >> b.addEvent("submit", function(event){ >> MyCart.add(b, true) >> }).bind(this) >> }) >> >> but I get bind is not a function error?
