BBC-News/Imager.js — pull request #25 by oncletom (2013-11-06 09:57:59+00:00)
Title: [READY] Triggering on Events/Manually

# The intention

Imager takes care about some events like `scroll` and `resize`. *Depending of the OS/Browser, they are triggered in a different order, so does `orientationchange`*.

If people also have their own business logic for these events or use a third party lazy loader like [lazyload](https://github.com/vvo/lazyload), they will hardly deal Imager as they can't control the events execution order.

# The proposal

Removing the internal event listening (people use their own or plain old DOM Events), eventually providing an external plugin

```javascript
var imgr = new Imager();

document.getElementById('fullscreen-button-reader').addEventListener('click', imgr.resize);

$(window).on('resize', function(){
$get('/news').then(updateSidebarEntries).then(imgr.resize);
});
```