thinkpixellab/PxLoader — pull request #21 by timohausmann (2013-04-10 08:23:14+00:00)
Title: ability to only load ressources with specified tags

Hey.
I added the following functionality:

It is now possible to load ressources in groups, defined by tags. Each group can have an own completionListener.
An example: you want to load a group of ressources on document ready. Later, when the user performs a specific action, you want to preload other ressources and treat them differently when loading is complete.

```javascript
loader.addImage( 'http://placekitten.com/200/300', 'initial' );
loader.addImage( 'http://placekitten.com/200/300', 'content' );

loader.addCompletionListener(function() {
[...]
}, 'initial');
loader.addCompletionListener(function() {
[...]
}, 'content');

loader.start('initial', true);
$('button').on('click', function() {
loader.start('content', true);
});
```

Here is a quick demo: http://jsbin.com/ugojeb/1/