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

slide-it

v1.1.1

Published

A configurable slideshow jquery widget

Downloads

6

Readme

slide-it

A jquery widget plugin providing configurable slideshow functionality.

Depends on jquery (tested with 1.11.2) and the jquery-ui widget (tested with 1.11.4) component. jQuery.Widget can be downloaded on its own from the jquery ui download builder: http://jqueryui.com/download/. This plugin works exactly as all other jQuery widgets. It has options and methods.

To use, simply markup your slideshow with a container tag, and the slides as immediate children to that container. The names and classes below are examples only, and don't affect function. That said, you will need to be able to precisely select the container - see START UP below.

 <div id=slides-container>
   <div class=slide></div>
   <div class=slide></div>
   <div class=slide></div>
 </div> 

SLIDES CONTAINER HEIGHT

Note, the plugin will absolutely position the slides within the slide container. This in turn means that unless you have explicitly specified a height for the container, the container will have a height of 0 (assuming no other children within the container). If you wish the plugin to make an attempt at fixing the container height for you, then either run the setContainerHeight() method, or set the setContainerHeight option to true.

START UP

Use jquery to select the container passing it to the slideit function, e.g.

var slideShow = $('#slides-container').slideit();

It's best to set all options upfront, ie pass in an options object to slideit() on initialisation. Otherwise you may have to call a function or functions for the change to take effect, e.g.:

slideShow.slideit('option','delay','8000');
slideShow.slideit('restart');

or

slideShow.slideit('option','controlPanelBackground','#754');
slideShow.slideit('removeControlPanel'); //required if a control panel was already available
slideShow.slideit('addControlPanel');

Options (with default):

  • autoplay:true,
  • setContainerHeight: false,
  • controlPanel: false,
  • controlPanelBackground: '#777',
  • allowDelayChange : true, //displays timer change function if control panel shown
  • delay: 2000,
  • delayText:'Enter delay between cards in seconds',
  • ok:'Ok',
  • selector:'' // if there are only specific children to the container you wish to target, add the selector to this option
  • slideHide:'fadeOut',
  • slideShow:'fadeIn',
  • slideChangeTime:1000

Methods:

  • play(),
  • pause(),
  • playToggle(),
  • addControlPanel(),
  • removeControlPanel(),
  • restart(),
  • setContainerHeight()

There are no events associated with this plugin. However, events can be added if they are requested.