src/jquery.simpleslider.js
function triggerSlideEnd(){
                if(!slided){
                    if(options.transition == "fade"){
                        $(options.slidesContainer).find(options.slides).each(function(index){
                            if($(this).data('index') == obj.currentSlide){
                                $(this).show();
                            }
                            else{
                                $(this).hide();
                            }
                        });
                    }

                    // Reset to the first slide when neverEnding has been enabled and the 'faked' last slide is active
                    if(options.transition == "slide" && options.neverEnding){
                        // Check if it's the 'last' slide
                        if(obj.currentSlide == obj.totalSlides - 1 && prevSlide === 0){
                            if ($.support.transition && jQuery().transition)
                                $(movecontainer).stop().transition({x: -(obj.totalSlides) * 100 + "%"}, 1, 'linear');
                            else
                                $(movecontainer).css({left: -(obj.totalSlides) * 100 + "%"});
                        }

                        // Check if it's the 'first' slide
                        if(obj.currentSlide === 0 && prevSlide == obj.totalSlides - 1){
                            if ($.support.transition && jQuery().transition)
                                $(movecontainer).stop().transition({x: "-100%"}, 1, 'linear');
                            else
                                $(movecontainer).css({left: "-100%"});
                        }
                    }
                    
                   
                    // Trigger event
                    var afterSlidingEvent = jQuery.Event("afterSliding", {
                        prevSlide: prevSlide,
                        newSlide: obj.currentSlide
                    });
                    $(element).trigger(afterSlidingEvent);
                    
                    slided = true;
                }
            }
function triggerSlideEnd(){
                if(!slided){
                    if(options.transition == "fade"){
                        $(options.slidesContainer).find(options.slides).each(function(index){
                            if($(this).data('index') == obj.currentSlide){
                                $(this).show();
                            }
                            else{
                                $(this).hide();
                            }
                        });
                    }

                    // Reset to the first slide when neverEnding has been enabled and the 'faked' last slide is active
                    if(options.transition == "slide" && options.neverEnding){
                        // Check if it's the 'last' slide
                        if(obj.currentSlide == obj.totalSlides - 1 && prevSlide === 0){
                            if ($.support.transition && jQuery().transition)
                                $(movecontainer).stop().transition({x: -(obj.totalSlides) * 100 + "%"}, 1, 'linear');
                            else
                                $(movecontainer).css({left: -(obj.totalSlides) * 100 + "%"});
                        }

                        // Check if it's the 'first' slide
                        if(obj.currentSlide === 0 && prevSlide == obj.totalSlides - 1){
                            if ($.support.transition && jQuery().transition)
                                $(movecontainer).stop().transition({x: "-100%"}, 1, 'linear');
                            else
                                $(movecontainer).css({left: "-100%"});
                        }
                    }
                    
                   
                    // Trigger event
                    var afterSlidingEvent = jQuery.Event("afterSliding", {
                        prevSlide: prevSlide,
                        newSlide: obj.currentSlide
                    });
                    $(element).trigger(afterSlidingEvent);
                    
                    slided = true;
                }
            }
function triggerSlideEnd ( ) { if ( ! slided ) { if ( options . transition == "fade" ) { $ ( options . slidesContainer ) . find ( options . slides ) . each ( function ( index ) { if ( $ ( this ) . data ( 'index' ) == obj . currentSlide ) { $ ( this ) . show ( ) ; } else { $ ( this ) . hide ( ) ; } } ) ; } // Reset to the first slide when neverEnding has been enabled and the 'faked' last slide is active if ( options . transition == "slide" && options . neverEnding ) { // Check if it's the 'last' slide if ( obj . currentSlide == obj . totalSlides - 1 && prevSlide === 0 ) { if ( $ . support . transition && jQuery ( ) . transition ) $ ( movecontainer ) . stop ( ) . transition ( { x : - ( obj . totalSlides ) * 100 + "%" } , 1 , 'linear' ) ; else $ ( movecontainer ) . css ( { left : - ( obj . totalSlides ) * 100 + "%" } ) ; } // Check if it's the 'first' slide if ( obj . currentSlide === 0 && prevSlide == obj . totalSlides - 1 ) { if ( $ . support . transition && jQuery ( ) . transition ) $ ( movecontainer ) . stop ( ) . transition ( { x : "-100%" } , 1 , 'linear' ) ; else $ ( movecontainer ) . css ( { left : "-100%" } ) ; } } // Trigger event var afterSlidingEvent = jQuery . Event ( "afterSliding" , { prevSlide : prevSlide , newSlide : obj . currentSlide } ) ; $ ( element ) . trigger ( afterSlidingEvent ) ; slided = true ; } }
Create trigger point after a slide slides. All the slides return a TransitionEnd; to prevent a repeating trigger we keep a slided var
Create trigger point after a slide slides . All the slides return a TransitionEnd ; to prevent a repeating trigger we keep a slided var