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

photoroller

v1.4.0

Published

A mouseover cycle-through photo gallery (iPhoto-like)

Downloads

39

Readme

jQuery PhotoRoller Plugin

A mouseover cycle-through photo gallery (iPhoto-like).

Description

jQuery PhotoRoller Plugin puts a set of images one behind another and turns that deck of images into a beautiful slideshow. All you need to do is move the mouse cursor horizontally throughout the deck and all images will show sequentially depending on the x-position of the cursor in the container area. Just like the iPhoto thumbnails preview.

Demo

photoroller.mev.bg

Getting Started

You can download the plugin as an archive.

Or you can grab it by using npm:

npm install photoroller

Or you can grab it by using Bower:

bower install photoroller

Installation

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

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

Also include the stylesheet for the plugin:

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

Usage

To start using you need two basic things:

I. Markup

You can have any markup structure inside of a container which PhotoRoller will be attached to, as long as there are child nodes inside.

So you can have this:

<div id="photoroller">
    <div><img src="photos/image001.jpg"></div>
    <div><img src="photos/image002.jpg"></div>
    <div><img src="photos/image003.jpg"></div>
    <div><img src="photos/image004.jpg"></div>
    <div><img src="photos/image005.jpg"></div>
</div>

or this:

<div id="any-id">
    <img src="photos/image001.jpg">
    <img src="photos/image002.jpg">
    <img src="photos/image003.jpg">
    <img src="photos/image004.jpg">
    <img src="photos/image005.jpg">
</div>

The ID is not necessary to be "photoroller" or even to be there. You can select the container by using class name or any other way you like. You'll find out more in the very next lines.

II. JavaScript

There are two ways of initializing PhotoRoller:

1. The first one is by calling it like a method, attached to an object. So, we can use the plugin for the above markup this way:

$("#any-id").photoroller(); // returns the target object

You can also provide some options. For example, if you want to specify which image to be the first one to show, you can do it by providing its number like this:

$("#any-id").photoroller({
    startpoint: 3
});

You can read more about what settings can be provided in the "Options" paragraph.


2. The second way of calling PhotoRoller is as follows:

$.photoroller(); // returns the target object

By calling it so, the plugin will look for only one container with an ID "photoroller". If no such, nothing will happen.

Of course, you can also provide a target object by doing so:

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

Options

nodes

nodes: $('selector')

Defines what child nodes to be used. If not provided, the plugin will use all childs.

startpoint

startpoint: 3 // default: 1

Defines which image to be the first one to show.

jump_back

jump_back: true // default: false

Defines whether the image should jump back to the startpoint when the mouse leaves the image.

jumppoint_click

jumppoint_click: false // default: true

If jump_back is active, this option defines whether the image to should jump back to can be set by clicking on the image.

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.