yairEO/photobox — pull request #40 by glebm (2013-07-16 12:43:11+00:00)
Title: Unbind handlers before binding new ones

Sometimes photobox.open() is called but close() is not. E.g.: `history: true` and

1. open a photobox with 4+ photos
2. mouse click next
3. click history back
4. press right arrow key => it calls the callback twice

This PR simply ensures that no handlers are never binded more than once.