swiper

jQuery Swiper script to run after Ng-Repeat elements are loaded

风格不统一 提交于 2019-12-09 14:21:57
问题 I'm making a web app using AngularJS, jQuery, HTML, CSS and Bootstrap, and I would like to pick some image links from my JSON that is located in an Apache2 server and use them in order to render those images in my main page. I would also like to swipe them like in a carousel. To make that work, I'm trying to use iDangero.us Swiper. When I pick my images with 3 separated divs, I have no problems. I get my images and then I can normally swipe them as I want. I do it like shown below: Main.html:

vue swiper 組件開發

。_饼干妹妹 提交于 2019-12-09 12:56:27
必須要先安裝npm install vue-awesome-swiper //組件 <template> <div class="my-swiper"> <swiper :optops="swiperOption" class="swiper-menu"> <swiper-slide><img src="~assets/img/home.png" alt=""/></swiper-slide> <swiper-slide><img src="~assets/img/home_1.png" alt=""/></swiper-slide> <swiper-slide><img src="~assets/img/home_3.png" alt=""/></swiper-slide> <div class="swiper-scrollbar" slot="scrollbar"></div> </swiper> </div> </div> </template> <script> export default { name:'MySwiper', data(){ return{ swiperOption:{ loop:true } } } } </script> <style> .my-swiper { width: 100%; height: 100%; } .swiper-slide

swiper手滑导航圆点不同步

我怕爱的太早我们不能终老 提交于 2019-12-09 11:44:24
// 滚动图 var mySwiper = new Swiper('.swiper-container', { // 如果需要分页器 pagination: { el: '.swiper-pagination', }, onSlideChangeEnd: function (swiper) { // pagination BUG var activeIndex = swiper.activeIndex; $('.swiper-pagination') .find('span') .eq(activeIndex) .addClass('swiper-pagination-bullet-active') .siblings() .removeClass('swiper-pagination-bullet-active'); } }); 来源: https://www.cnblogs.com/aiaitie/p/12010055.html

swiper手滑导航圆点不同步

前提是你 提交于 2019-12-08 22:41:43
// 滚动图 var mySwiper = new Swiper('.swiper-container', { // 如果需要分页器 pagination: { el: '.swiper-pagination', }, onSlideChangeEnd: function (swiper) { // pagination BUG var activeIndex = swiper.activeIndex; $('.swiper-pagination') .find('span') .eq(activeIndex) .addClass('swiper-pagination-bullet-active') .siblings() .removeClass('swiper-pagination-bullet-active'); } }); 来源: 51CTO 作者: 伊伊吖吖 链接: https://blog.51cto.com/11056727/2456961

微信小程序swiper使用网络图片不显示问题

 ̄綄美尐妖づ 提交于 2019-12-08 09:08:43
@ wxml代码: <view class="container"> <swiper indicator-dots="true}" autoplay="true" interval="3000" duration="1"> <block wx:for="{{imgUrls}}" wx:key="*this"> <swiper-item> <image src="{{item}}" width="355" height="150"></image> </swiper-item> </block> </swiper> </view> js代码: data: { imgUrls: [ "http://img0.imgtn.bdimg.com/it/u=2394972844,3024358326&fm=26&gp=0.jpg", "http://img5.imgtn.bdimg.com/it/u=3008142408,2229729459&fm=26&gp=0.jpg", "http://img4.imgtn.bdimg.com/it/u=2939038876,2702387014&fm=26&gp=0.jpg" ] } 结果:(无法显示,查看控制台无报错)      解决,swiper添加宽高。 wxss: .container{ width: 100%; } .container

Custom pagination swiper.js

岁酱吖の 提交于 2019-12-08 07:21:06
问题 I'm using swiper.js (http://idangero.us/swiper/api/#.WCBYcxKLTfA) Please find attached a fiddle of the working code of my current code: https://jsfiddle.net/0L2h1p25/12/ I'm now trying to get it styled the way I want but there are 2 issues I need to get fixed. Part 1: Pagination dots are not clickable Part 2: Navigation does not work Part 1: I've changed the pagination in swiper.js in order to get the style I want, it's now stopped the user from clicking on the dots to get to the slide. You

Possible to disable touch simulation for slides but not scrollbar (idangerous swiper)?

旧城冷巷雨未停 提交于 2019-12-07 09:41:18
问题 I have an idangerous swiper on my page which successfully simulates touch events on both the slides and accompanying scrollbar (allowing a mouse click and movement to slide slides left or right). This is fine, but I've now called draggable on the slides within the swiper, which means I need to stop this touch simulation (dragging the slides and moving them at the same time is causing confusion) - but only on the slides, not the scrollbar (I still need the scrollbar to function as it did

swiper手动滑动之后自动轮播失效的解决方法

孤者浪人 提交于 2019-12-06 14:10:17
解决方法 <script> var mySwiper = new Swiper('.swiper-container',{ autoplay: { disableOnInteraction: false, delay:2000, }, }) </script> 用户操作swiper之后,是否禁止autoplay。默认为true:停止。 如果设置为false,用户操作swiper之后自动切换不会停止,每次都会重新启动autoplay。 操作包括触碰,拖动,点击pagination等。 来源: https://www.cnblogs.com/wangyongx/p/11988606.html

how to change the pagination bullet in a swiper to text?

左心房为你撑大大i 提交于 2019-12-06 11:03:29
问题 In my project : http://moransh4.github.io/Luca/ I need to change the swiper-pagination-bullet at the last section to this: The "active" change to green. I read ( from : http://idangero.us/swiper/api/) that i can customize with this : paginationBulletRender: function (index, className) { return '<span class="' + className + '">' + (index + 1) + '</span>'; } Sorry i go lost with it, How to do it? 回答1: You should instead use paginationCustomRender to create custom design.Define your names in

vue 卡片轮播 中间大两边小 复制代码就可使用

[亡魂溺海] 提交于 2019-12-06 05:32:34
vue开发中遇到类似原生这种卡片轮播,中间大两边小的需求 网上搜了下,很多都是修改前一个和后一个的高度,然后设置了margin-top,但个人感觉这样病不能保证很好的居中,在研究了官网的demo后,发现 https://www.swiper.com.cn/demo/240-effect-coverflow.html 这个很好,可以实现需求,而且比网上那种那更好些。 1.安装swiper cnpm install --save-dev swiper@3.4.2 (此处注意不要使用 npm install swiper,安装4.x的版本会在ie和某些手机的浏览器显示白屏 ) 2.页面的代码 <template> <div class="swiper-container"> <div class="swiper-wrapper"> <div class="swiper-slide" v-for="(item,index) in images" :key="index"> <img class="swiper-img" :src="item" /> </div> </div> </div> </template> <script> import Swiper from "swiper" import 'swiper/dist/css/swiper.min.css' export