SAMYANG/m/asset/js/sy.m.plugin.js
/**
         * Styles the horizontal slides for a section.
         */
Styles the horizontal slides for a section.
Styles the horizontal slides for a section .
function styleSlides(section, slides, numSlides) {
            var sliderWidth = numSlides * 100;
            var slideWidth = 100 / numSlides;
            slides.wrapAll('<div class="' + SLIDES_CONTAINER + '" />');
            slides.parent().wrap('<div class="' + SLIDES_WRAPPER + '" />');
            section.find(SLIDES_CONTAINER_SEL).css('width', sliderWidth + '%');
            if (numSlides > 1) {
                if (options.controlArrows) {
                    createSlideArrows(section);
                }
                if (options.slidesNavigation) {
                    addSlidesNavigation(section, numSlides);
                }
            }
            slides.each(function (index) {
                $(this).css('width', slideWidth + '%');
                if (options.verticalCentered) {
                    addTableClass($(this));
                }
            });
            var startingSlide = section.find(SLIDE_ACTIVE_SEL);
            if (startingSlide.length && ($(SECTION_ACTIVE_SEL).index(SECTION_SEL) !== 0 || ($(SECTION_ACTIVE_SEL).index(SECTION_SEL) === 0 && startingSlide.index() !== 0))) {
                silentLandscapeScroll(startingSlide, 'internal');
            } else {
                slides.eq(0).addClass(ACTIVE);
            }
        }
function styleSlides ( section , slides , numSlides ) { var sliderWidth = numSlides * 100 ; var slideWidth = 100 / numSlides ; slides . wrapAll ( '<div class="' + SLIDES_CONTAINER + '" />' ) ; slides . parent ( ) . wrap ( '<div class="' + SLIDES_WRAPPER + '" />' ) ; section . find ( SLIDES_CONTAINER_SEL ) . css ( 'width' , sliderWidth + '%' ) ; if ( numSlides > 1 ) { if ( options . controlArrows ) { createSlideArrows ( section ) ; } if ( options . slidesNavigation ) { addSlidesNavigation ( section , numSlides ) ; } } slides . each ( function ( index ) { $ ( this ) . css ( 'width' , slideWidth + '%' ) ; if ( options . verticalCentered ) { addTableClass ( $ ( this ) ) ; } } ) ; var startingSlide = section . find ( SLIDE_ACTIVE_SEL ) ; if ( startingSlide . length && ( $ ( SECTION_ACTIVE_SEL ) . index ( SECTION_SEL ) !== 0 || ( $ ( SECTION_ACTIVE_SEL ) . index ( SECTION_SEL ) === 0 && startingSlide . index ( ) !== 0 ) ) ) { silentLandscapeScroll ( startingSlide , 'internal' ) ; } else { slides . eq ( 0 ) . addClass ( ACTIVE ) ; } }
Styles the horizontal slides for a section.
Styles the horizontal slides for a section .
//if the slide won't be an starting point, the default will be the first one //the active section isn't the first one? Is not the first slide of the first section? Then we load that section/slide by default.