Skip to content

lepola/slidefrom

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

SlideFrom by lepola

Easy slide library for javascript.

Slide / fade element when it's scrolled into view.

Require

JQuery and JQuery UI

<script src="//code.jquery.com/jquery-1.12.4.js"></script>

<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.3/jquery-ui.min.js"></script>

Usage

Enable in javascript with:

slideFrom.enable = 1

Set attribute 'slidefrom' to element, and give parameters;

slidefrom="slide, FROM, DURATION"

or

slidefrom="fade, DURATION"

Example:

<article slidefrom="slide,left,800">

<p> Hello my friend! </p>

</article>

Example2:

<article slidefrom="fade,800">

<p> Hello my friend! </p>

</article>