Trigger layer event with JavaScript

You can trigger a custom event with JavaScript code like this:

n2ss.trigger(jQuery('.n2-ss-slide-active'), 'eventname');

For example, trigger the "switch" event on slide switching at slider #47:

n2ss.ready(47, function(slider, sliderElement) {
    sliderElement.on('mainAnimationComplete', 
    function(e, animation, previousSlideIndex, currentSlideIndex) {
       n2ss.trigger(jQuery('.n2-ss-slide-active'), 'switch');
    });
});