I am getting a Safari only error: TypeError: Result of expression near ‘…}.bind(this))…’ [undefined] is not a function.
These are lines 88-92:
$(this.options.work).each(function(i, item) {
tmpItem = new GridItem(item);
tmpItem.getBody().appendTo($("#" + this.gridId));
this.gridItems.push(tmpItem);
}.bind(this));
Any ideas what is causing this?
Older versions of Safari don’t support
bind. If you try this (http://jsfiddle.net/ambiguous/dKbFh/):you’ll get
falsein older Safaris buttruein the latest Firefox and Chrome. I’m not sure about Opera or IE but there is a compatibility list (which may or may not be accurate):You can try to patch your own version in with something like this:
but check if
Function.prototype.bindis there first.