Skip to content

liri/ActionSlideJS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActionSlideJS

Ready? Steady? Action!

alt tag

Simple animation library for action movie credits (aka "action slide") in JavaScript, supporting all major browsers:

  • IE9+
  • Firefox
  • Safari
  • Chrome
  • Opera

Prerequisite: JQuery

Copyright (c) 2013 - 2013 Liron Aichel

Project homepage: http://lironaichel.com/jsworks/actionslide/
Github homepage: http://liri.github.io/ActionSlideJS.

CSS3 Demo: http://lironaichel.com/jsworks/actionslide/samples/css3Background.html
Documentation: http://lironaichel.com/jsworks/actionslide/docs/index.html

Licensed under MIT-style license: Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Getting Started

ActionSlideJS is a tiny animation library for creating a "action movie opening" like animation (also works as jQuery plugin).
To start use ActionSlideJS, include jQuery library:

  <script src="js/jquery.min.js"></script>
                        Include ActionSlideJS library:
  <script src="js/actionslide.min.js"></script>
						<p>
                        Include ActionSlideJS styling (CSS):
                        </p>
  <link rel="stylesheet" type="text/css" href="css/actionslide.css" />
						<h4>You're good to go!</h4>
					</section>
                    <section id="basic"> 
                        <div class="page-header">
                            <h1>Basic example</h1>
                        </div>
                                       
                        <h2>Zero lines of code!</h2>
                        <p>
                        ActionSlideJS automatically detect your DOM element. Just place "data-role='actionSlide'" on your list element (ul):
                        </p>
  <ul data-role="actionSlide">
        <li data-title="Slide I" data-duration="3000">
            <span>Slide I Content</span>
        </li>
        <li data-title="Slide II" data-duration="2000">
            <span>Slide II Content</span>
        </li>
</ul
                    </section>
                    <section id="options">
                        <div class="page-header">
                            <h1>Helpful options</h1>
                        </div>
                        <h2>Stage Animation</h2>
                        <p>There is an option to animate background lines, you can disable it using:</p>
                        <h3>data-animate-background</h3>
<ul data-role="actionSlide" data-animate-background="false">
                        <p>It's pretty cool and enhanch the "action" style.</p>

                        <h2>Slide Animation</h2>
                        <p>Each slide has default properties during the slideshow:</p>
                        <ul>
                          <li>title = (empty)</li>
                          <li>duration = 2000 (2 seconds)</li>
                          <li>animation = slide</li>
                          <li>direction = left-to-right</li>
                          <li>textAlign = left</li>
                          <li>easing = linear</li>
                          </li>
                        </ul>
                        <p>You can change any of the default values using "data-" on each slide element (li).</p>

                     	<h3>data-title</h3>
                        <p>
                        Appears as the slide title, different just in style from the slide content.
                        </p>
                        <pre class="prettyprint linenums">

<li data-title="Slide I">

                        <h3>data-duration</h3>
                        <p>
                        The duration of the slide animation.
                        </p>
                        <pre class="prettyprint linenums">

<li data-duration="5000">

                        <h3>data-animation</h3>
                        <p>
                        The animaiton type for this slide, possible values are currently 'fade' or 'slide'.
                        </p>
                        <pre class="prettyprint linenums">

<li data-animation="slide/fade">

                        <h3>data-direction</h3>
                        <p>
                        Only relevant for 'slide' animation. Controls the direction of the animation, possible values are 'rtl' or 'ltr'.
                        </p>
                        <pre class="prettyprint linenums">

<li data-direction="rtl/ltr">

                        <h3>data-textAlign</h3>
                        <p>
                        The slide content text alignment.
                        </p>
                        <pre class="prettyprint linenums">

<li data-textAlign="center">

                        <h3>data-easing</h3>
                        <p>
                        The easing function of the slide animation.
                        </p>
                        <pre class="prettyprint linenums">

<li data-easing="linear">

Using easing functions other than 'linear' requires jQuery UI library.

                  <section id="css">
                        <div class="page-header">
                            <h1>CSS Customization</h1>
                        </div>                           
                        <p>ActionSlideJS works on top of your container element, you can style the container as you wish.
                        <br />
                        In order to match ActionSlideJS styling to your container, use the following classes:</p>

                        <h4>actionslide-container</h4>
                        <p>Container for each animated slide.</p>
                        <pre class="prettyprint linenums">

.actionslide-container a { color: white; text-decoration: underline; }

.actionslide-container a:hover { text-decoration: none; }

actionslide-title

Slide title style

.actionslide-title {
font-size: 34px;
font-style: italic;
font-weight: bold;
color: black;
margin-bottom: 10px;
text-shadow: -1px -1px #bbb,1px 1px #bbb;
color:#eee;
letter-spacing: 2px;
}

actionslide-content

Slide content style

.actionslide-content {
font-size: 18px;
text-shadow: -1px -1px #bbb,1px 1px #bbb;
color:#eee;
}

actionslide-bglines

Background lines animation

.actionslide-bglines {
height: 2px;
background-color: white;
opacity: 0.1
}

Analytics

About

Simple animation library for action movie credits (aka "action slide") in JavaScript

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published