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

jumboslider

v1.5.0

Published

Yet another responsive slider for any kind of content

Downloads

3

Readme

jQuery JumboSlider Plugin

Yet another responsive slider for any kind of content.

Description

JumboSlider is a light and responsive jQuery plugin that provides a simple way to transform any kind of content on any web page into a compact and beautiful slideshow. It's easy to setup with the given options and it's also a great module to interact with due to its methods and callback events.

Demo

jumboslider.mev.bg

Getting Started

You can download the plugin as an archive.

Or you can grab it by using npm:

npm install jumboslider

Or you can grab it by using Bower:

bower install jumboslider

Installation

Include the script after the jQuery library (unless you package scripts otherwise):

<script src="/path/to/jumboslider.min.js"></script>

Also include the stylesheet for the plugin:

<link type="text/css" rel="stylesheet" href="/path/to/jumboslider.min.css">

Usage

Initialization

Firstable, you need to have a proper markup:

<div class="jumboslider">
    <div class="jumboslider-viewport">
        <div class="jumboslider-overview">
            <div class="jumboslider-item">
                <!-- content of your choice -->
            </div>
            <div class="jumboslider-item">
                <!-- content of your choice -->
            </div>
            <div class="jumboslider-item">
                <!-- content of your choice -->
            </div>
            <div class="jumboslider-item">
                <!-- content of your choice -->
            </div>
        </div>
    </div>
</div>

Now, there are two ways of initializing JumboSlider.

I. jQuery function

The first way is as follows:

$.jumboslider(); // returns the target

This is the most basic initialization. By calling it so, the plugin will look for any element that has a "jumboslider" class. If no such elements, nothing will happen.

Of course, you can also provide specific target/s with a custom selector by doing so:

$.jumboslider({
    target: $('selector')
});

II. Method function

The second way is as an object method. So, we can also use the plugin this way:

$('selector').jumboslider(); // returns the target

Options

target

Defines a custom target selector.

The target property is only available when initialize JumboSlider as a jQuery function like the example below.

$.jumboslider({
    target: $('selector')
});

Default value: $('.jumboslider')

startPosition

Defines which item will be the first one to be shown.

$.jumboslider({
    startPosition: 1
});

Type: number
Default value: 1

arrows

Defines whether or not graphic arrows should be shown

$.jumboslider({
    arrows: true
});

Type: boolean
Default value: true

pagination

Defines whether or not a pagination should be shown

$.jumboslider({
    pagination: true
});

Type: boolean
Default value: true

transition

Defines the speed of the transition between slides (in milliseconds).

$.jumboslider({
    transition: 200
});

Type: number
Default value: 500

loop

Defines whether or not the JumboSlider should be able to start over from the first item after it reaches to the last one and also to jump back to the last item right from the first one.

$.jumboslider({
    loop: false
});

Type: boolean
Default value: false

autoplay

Defines whether or not the JumboSlider should runs automatically by providing a lifetime duration for the slides (in milliseconds). The default duration is 0 which means the autoplay is off.

$.jumboslider({
    autoplay: 3000
});

Type: number
Default value: 0

Events

There are two ways of binding JumboSlider events.

1. As option properties:

$('selector').jumboslider({
    onSlide: function(e, target) {
        // do something
    }
});

2. As jQuery events:

$('selector').jumboslider().bind('onSlide', function(e, target) {
    // do something
});

And here are all available events:

onSlide

Triggers when a slide transition is being fired.

var slider = $('selector').jumboslider();

slider.bind('onSlide', function(e, target) {
    // do something
});

onArrowClick

Triggers when a graphic arrow controller is being used.

var slider = $('selector').jumboslider();

slider.bind('onArrowClick', function(e, target) {
    // do something
});

onPaginationClick

Triggers when a pagination controller is being used.

var slider = $('selector').jumboslider();

slider.bind('onPaginationClick', function(e, target) {
    // do something
});

Methods

slideNext()

Slides to the next item (if any).

var slider = $('selector').jumboslider();

slider.slideNext();

slidePrev()

Slides to the previous item (if any).

var slider = $('selector').jumboslider();

slider.slidePrev();

slideTo(position)

Slides to a specific item.

var slider = $('selector').jumboslider();

slider.slideTo(5); // will slide to the fifth item

Browsers compatibility

  • Apple Safari
  • Google Chrome
  • Microsoft Internet Explorer 9+
  • Mozilla Firefox
  • Opera

Dependencies

License

Copyright © 2017 Martin Metodiev. Licensed under the MIT license. See here for more details.