conflicts with prototype.js #3

kirs opened this Issue May 17, 2011 · 1 comment


None yet

2 participants

kirs commented May 17, 2011

prototype.js line 1214:
function $H(object) { return new Hash(object); };

If I include prototype and js-hash to my page, Chrome console prints:
prototype.js:1216 Uncaught TypeError: object is not a function

scq commented May 18, 2011

Prototype.js creates a global object called Hash. This is an issue with prototype, not js-hash.
If you want to make js-hash work with prototype, go to line 37 of Hash.js, and replace

var Hash = (function () {


var jshash= (function () {

and just use jshash.init, jshash.go, etc instead of Hash.init, Hash.go, etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment