npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

z-carousel

v2.0.0

Published

A simple, high-performance and cross-browser jQuery text rotator and carousel plugin for Vue. The plugin supports usage of Animate.css animations.

Downloads

213

Readme

z-Carousel GitHub release npm version

A simple, high-performance and cross-browser jQuery text rotator and carousel plugin for Vue.js. The plugin supports usage of Animate.css animations.

Prerequisites

z-Carousel is a jQuery based plugin. So, please make sure that jQuery is installed and has been initialized before z-Carousel is initialized.

Install jQuery via npm:

npm install --save-dev jquery

z-Carousel by default uses jQuery's fadeIn animation. Animate.css has to be installed if you want to use a custom animation.

Install Animate.css via npm:

npm install --save-dev animate.css

z-Carousel also supports carousel pagination which uses a FontAwesome icon by default. Install FontAwesome to use the default pagination style. You can skip FontAwesome installation, if pagination is not required or if you want to custom style the pagination icons.

Install FontAwesome via npm:

npm install --save-dev font-awesome

Installation

Install via npm:

npm install --save-dev z-carousel

Or, Standalone installation

  • Download the file from here
  • Save the downloaded file in your server.
  • Import the file in your application using <script src="path_to_downloaded_file"></script>
  • Plugin initialization is given at the bottom of Usage section.

Usage

z-Carousel is easy to implement in your existing applications.

HTML Sample

<div class="z-carousel-wrapper">
    <div class="z-carousel" data-delay="2000" data-interval="4000">
        <ul>
            <li style="display:none;">
                Beautiful templates, super-fast turnaround, and awesome staff. Thank you Send2Sell for helping close my listings!
            </li>
            <li style="display:none;">
                I love Send2Sell! I use the service for all of my listings and get so much interest after each email blast.
            </li>
        </ul>        
    </div>
</div>
  • Carousel pagination, if required, is added by the plugin as the last child element of z-carousel-wrapper container. So, it is adviced to keep the carousel element list within this container.

  • A single page can have multiple carousel elements and z-Carousel will handle each carousel differently. z-Carousel looks for all the elements in the DOM with z-carousel class and register a carousel for the element.

  • Set the li items to have display:none; style. This is to make sure that the UI does not look bad before the initilization of the plugin.

  • As you can see, the element with z-carousel is where we define the various customization options. Following are the data fields and their default values used in the plugin to customise the carousel.

| Data | Default | Description | | :------ | :-------: | :----------- | | data-pagination | false | Set this field data-pagination='true' to show carousel pagination | | data-delay | 2000ms | Define the initial delay after which the carousel rotation should begin. For initial delay of 5 seconds, set data-delay='5000' as in <div class='z-carousel' data-delay='5000'> | | data-interval | 3000ms | This property determines, how long an item has to be displayed. For displaying an item for 3.5 seconds, set data-interval='3500' | | data-speed | 600ms | This is the speed at which jQuery's fadeIn completes animation. If the animation has to be completed in 1 second, set data-speed='1000'. This data does nothing, if a custom animation is used. | | data-enter-animation | Uses jQuery's fadeIn animation | Define this property to use a custom animation provided by Animate.css. To have a bounceIn animation, set data-enter-animation='bounceIn'. To use the Animate.css slow class, set data-enter-animation='bounceIn slow'. Similarly, all the Animate.css speed classes can be used. |

Plugin Initialization

  • In Vue.js components or in ES6 scripts, import the plugin using import zCarousel from "z-carousel"
  • Initialise the plugin using zCarousel.registerCarousels();

For example, in Vue.js component

//
// you can use any variable name for the import.
//
import carousel from "z-carousel"

export default{
    mounted:function(){
        carousel.registerCarousels();
    }
}

Plugin Initialization of Standalone Installation

<script type='text/javascript'>
    $(function() {                
        zCarousel.registerCarousels();
    });
</script>

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details