Javascript/jQuery

FlexSlider 페이지 넘어가면 페이징 보이기

728x90
반응형
<div class="popupWrap pop_is_center" id="popup48" style="width: 400px;">
    <div class="popup_slider flexslider">
        <ul class="slides">
            <li></li>
            <li></li>
          </ul>
    <span class="pop_paging">2/2</span>
    <div class="popup-close">
        <button class="today_btn today48" type="button"><span class="txt">하루동안 닫기</span></button>
        <button class="close_btn close48" type="button"><span class="txt">닫기</span></button>
    </div>
</div>
    $(function () {
        var $status = $('.pop_paging');
        var $sliderElement = $('.popup_slider');
        var $slideElement = $('.popup_slider li');
        $status.text("1/" + $slideElement.length);

        $sliderElement.flexslider({
            animation: "slide",
            controlNav: false,
            animationLoop: false,
            //directionNav: false,
            slideshow: true,
            slideshowSpeed: 5000,
            start: function (slider) {},
            after: function (slider) {
                $status.text(slider.currentSlide + 1 + "/" + $slideElement.length);
            }
        });
    })
728x90
반응형