- - the example will add a clip to the lower left.
## Template
Template authors can trigger the activation and deactivation of the plugins functionality with a custom event that can be triggered like the following example:
```
jQuery(function(){
var layerAnimationMediaTrigger = function(){
$('div.layeranimation').trigger('layeranimation.activate', [ $(this).hasClass('desktop') ] );
};
window.setTimeout(function(){
$('.no.mediasize.mobile:visible,.no.mediasize.midsize:visible,.no.mediasize.desktop:visible')
.livequery(layerAnimationMediaTrigger).each(layerAnimationMediaTrigger);
}, 0);
});
});
```
The requirements in this case are: three ``
`` elements with respective classes and styles that make the appear and disappear depending on the screen size. Furthermore it requires the [livequery plugin](http://docs.jquery.com/Plugins/livequery).
The effect would be, that the layeranimation plugin is enabled only for the desktop screen size.