nickdekruijk/slider.js 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nickdekruijk/slider.js

Composer 安装命令:

composer require nickdekruijk/slider.js

包简介

A simple jQuery slider plugin

关键字:

README 文档

README

A basis slider plugin to create slideshows/faders on your webpage. No fancy stuff, just easy to use yet powerfull enough for most situations. Fully customizable with CSS.

##Usage HTML:

<div class="slider">
    <div>Slide 1 content</div>
    <div>Slide 2 content</div>
    <div>Slide 3 content</div>
</div>

###CSS Style your slider however you want. The .slider element will be the viewport. You probably want this to have CSS {overflow:hidden}

The slides(divs) inside the viewport will be set to absolute positioned, 100% width and 100% height of the viewport/parent div.

You do need to add CSS for the dots if you want them, for example:

DIV.slider .dots {display:block;z-index:10;position:absolute;left:0;right:0;text-align:center}
DIV.slider .dots>SPAN {display:inline-block;width:16px;height:16px;border-radius:10px;border:1px solid #fff;margin:10px 5px 0;color:transparent;font-size:11px;line-height:15px}
DIV.slider .dots>SPAN:hover {background-color:rgba(255,255,255,0.5);cursor:pointer}
DIV.slider .dots>SPAN.activeslide {background-color:#fff}

You probably want CSS for the previous and next buttons too, for example:

DIV.slider:hover .next,
DIV.slider:hover .prev {position:absolute;top:50%;height:50px;width:50px;border-radius:50px;border:2px transparent #fff;margin:-27px 25px 0;z-index:10;background-color:rgba(0,0,0,0.25)}
DIV.slider:hover .next {right:0}
DIV.slider:hover .next>SPAN,
DIV.slider:hover .prev>SPAN {position:absolute;border-top:3px solid #fff;border-right:3px solid #fff;width:20px;height:20px}
DIV.slider:hover .next>SPAN {transform:rotate(45deg);top:13px;left:9px}
DIV.slider:hover .prev>SPAN {transform:rotate(-135deg);top:13px;left:17px}
DIV.slider:hover .next:hover,
DIV.slider:hover .prev:hover {background-color:rgba(0,0,0,0.6);cursor:pointer}

###JS

$('DIV.slider').slider({
    option1:'value1',
    option2:'value2'
});

###Options: default value|other options

transition: fade|swipe|scroll   # Fadein/-out, Swipe from right to left or scroll everything
transitionspeed: 400            # The transition speed in milliseconds, e.g. time it takes to fadein/-out or swipe to next slide
alternativefade: false|true     # Use alternative method for fading so slides with transparent elements will work better but site background will be slightly visible during transition
autoplay: true|false            # Automaticaly start playing
pauseonhover: true|false         # Pause autoplay when user hovers over the viewport
arrowkeys: true|false           # Enable keyboard left and right arrow keys
touchkeys: false|true           # Show arrow keys on touch devices
touchwipe: true|false           # Enable touch device left and right swipe gestures
sliderspeed: 5000               # Time to wait in milliseconds before next slide is shown when autoplay=true
slideselector: 'div'            # The viewport DOM child element that will represent slides. Could also be .slide if you have html like <div class="slider"><div class="slide">Slide content</div> etc.
activeslide: 'activeslide'      # Class to add to the active slide/dot
lazy: false                     # Lazy load images in the slider, set data-lazy="imageurl" on elements. On an img the src attribute will be set and the background-image style will be set on other element types

nickdekruijk/slider.js 适用场景与选型建议

nickdekruijk/slider.js 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 107 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 08 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「jquery」 「slider」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 nickdekruijk/slider.js 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 nickdekruijk/slider.js 我们能提供哪些服务?
定制开发 / 二次开发

基于 nickdekruijk/slider.js 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 107
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-08-01