简体   繁体   English

图像轮播

[英]Image Gallery Carousel

i try to use the carousel FredSel gallery. 我尝试使用旋转木马FredSel画廊。 but nothing happend when i clicked on the button to open. 但是当我单击按钮以打开时什么也没有发生。 The gallery i chosse are the swipe gallery and i have downloaded the libraries from the site. 我选择的画廊是刷卡画廊,我已经从该站点下载了库。 i have tried lots of things but nothing worked. 我尝试了很多东西,但没有任何效果。

Someone can help me? 有人可以帮我吗? i'm new in jquery 我是jQuery的新手

i dont know what i do wrong. 我不知道我做错了什么。

this is my code. 这是我的代码。

<script src="jquery.carouFredSel-6.2.0-packed.js"></script>
<script src="jquery.touchSwipe.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css"> 
<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>

JAVASCRIPT: JAVASCRIPT:

<script>
$("#foo4").carouFredSel({
    auto        : false,
    swipe       : {
        onTouch     : true,
        onMouse     : true
    }
});
</script>

HTML5 HTML5

<div data-role="header" data-position="fixed" data-fullscreen="true" data-id="footer">                      
         <a href="#p1" data-icon="home" data-iconpos="notext">Home</a>
         <h1>HOME</h1>
         <a href="#foo4" data-icon="grid" data-iconpos="notext" data-inline="true" class="ui-btn-right" data-direction="reverse" style="margin-right:70px">GALLERY</a>
</div>

    <div id="image_carousel">
        <div id="foo4">
            <img src="images/small/1.jpg" alt="basketball" width="140" height="140" />
            <img src="images/small/2.jpg" alt="beachtree" width="140" height="140" />
            <img src="images/small/3.jpg" alt="cupcackes" width="140" height="140" />
            <img src="images/small/4.jpg" alt="hangmat" width="140" height="140" />
            <img src="images/small/5.jpg" alt="new york" width="140" height="140" />
            <img src="images/small/6.jpg" alt="laundry" width="140" height="140" />
            <img src="images/small/7.jpg" alt="mom son" width="140" height="140" />
            <img src="images/small/8.jpg" alt="picknick" width="140" height="140" />
            <img src="images/small/9.jpg" alt="shoes" width="140" height="140" />
            <img src="images/small/10.jpg" alt="paris" width="140" height="140" />
            <img src="images/small/11.jpg" alt="sunbading" width="140" height="140" />
            <img src="images/small/12.jpg" alt="yellow couple" width="140" height="140" />
        </div>
        <div class="clearfix"></div>
    </div>

CSS: CSS:

#image_carousel {
    padding: 15px 0 15px 40px;
}
#image_carousel img {
    border: 1px solid #ccc;
    background-color: white;
    padding: 9px;
    margin: 7px;
    display: block;
    float: left;
}
#clearfix {
    float: none;
    clear: both;
}

Re arrange Sequence 重新安排顺序

<script src="http://code.jquery.com/jquery-1.9.0.min.js"></script>
<script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>
<script src="jquery.carouFredSel-6.2.0-packed.js"></script>
<script src="jquery.touchSwipe.min.js"></script>
<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css">

and then try 然后尝试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM