paulrouget/dzslides — Issue #53: safari bind event problem
Author: revolunet
Created: 2012-01-09 11:21:23+00:00
State: open

Hi !

I had some problems using dzslides with Safari (and thus phantomjs). The problem is with the `bind`event call.

I fixed it with this :

function init() {
Dz.init();
window.onkeydown = Dz.onkeydown.bind(Dz);
window.onresize = Dz.onresize.bind(Dz);
window.onhashchange = Dz.onhashchange.bind(Dz);
window.onmessage = Dz.onmessage.bind(Dz);
}

window.onload = init;

Hops this helps.