Git Product home page Git Product logo

infiniteslidev2's Introduction

Infiniteslide.js v2

要素を無限スクロールさせるjQueryプラグインです。 CSS3 Animationを使用しているため、滑らかです。

対応ブラウザ

Flexboxと@keyframeによるアニメーションを使用しているため、IE10以上、Android4.4以上です。

デモ

http://wood-roots.com/sample/infiniteslidev2/

##ブログ記事 http://wood-roots.com/?p=1975

使い方

<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="infiniteslidev2.js"></script>

<script type="text/javascript">
	$(function(){
		$('.infiniteslide').infiniteslide({
			'speed': 100, //速さ 単位はpx/秒です。
			'direction': 'left', //up/down/left/rightから選択
			'pauseonhover': true, //マウスオーバーでストップ
			'responsive': false, //子要素の幅を%で指定しているとき
			'clone': 1 //子要素の複製回数
		});
	});
</script>

<!-- 途中略 -->

<div class="infiniteslide">
	<ul>
		<li><img src="img/1.jpg" alt="" /></li>
		<li><img src="img/2.jpg" alt="" /></li>
		<li><img src="img/3.jpg" alt="" /></li>
		<li><img src="img/4.jpg" alt="" /></li>
	</ul>
</div>

オプション

オプションは5種類です。

  • speed : 速さ
  • direction : 向き(up/down/left/right より選択)
  • pauseonhover : マウスオーバーでアニメーションをストップする(true/false)
  • responsive : レスポンシブ対応するかどうか。スライドの子要素を%で指定している場合はtrueにしてください。
  • clone : 子要素を複製する回数。子要素の数が少なくループが途切れる場合は2以上を指定してください。

更新情報

2017.07.11 cloneオプションの追加。 2017.07.10 初版公開

infiniteslidev2's People

Contributors

woodroots avatar

Watchers

Mai Cong Ngoan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.