Swiper不使用Jquery处理可拖动内容?

时间:2016-05-25 19:53:01

标签: javascript jquery html jquery-ui swiper

当我在Javascripts中使用swiper时,它会起作用但是当我用内容更新一张幻灯片并使用JQuery使其可拖动时。内容无法拖动为什么? 这是我的代码

    <!-- Swiper -->
<div class="swiper-container">
    <div class="swiper-wrapper">
        <div class="swiper-slide">
            <style>
                #draggable {
                    width: 150px;
                    height: 150px;
                    padding: 0.5em;
                }
            </style>
            <script>
                $(function () {
                    $("#draggable").draggable();
                });
            </script>
            <div id="draggable" class="ui-widget-content">
                <p>Drag me around</p>
            </div>
        </div>
        <div class="swiper-slide">Slide 2</div>
        <div class="swiper-slide">Slide 3</div>
    </div>
    <!-- Add Pagination -->
    <div class="swiper-pagination"></div>
</div>

<!-- Swiper JS -->
<!--<script src="../dist/js/swiper.min.js"></script>-->
<script src="swiper.jquery.js"></script>
<script src="swiper.js"></script>
<!-- Initialize Swiper -->
<script>
    var swiper = new Swiper('.swiper-container', {
        pagination: '.swiper-pagination',
        paginationClickable: true
    });
</script>

0 个答案:

没有答案