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

jquery-easyscroll

v0.0.2

Published

A jQuery plugin for scrolling a set of images/elements easily

Downloads

2

Readme

jquery-easyscroll

A jQuery plugin for scrolling a set of images/elements easily

Note

EasyScroll : a scroll-tastic jQuery plugin Inspired from jquery-simplyscroll

Last revised: 07/01/2024

Note : The original project on github (simplyscroll) was marked as lagecy and we were not getting new updates on that, so we made some modification and make it available for all with new name.

Features

  • Smooth Scrolling: Creates smooth transition effects when navigating between sections of a webpage.
  • Customizable Scrolling Speed: Control the speed of the scrolling animation to fit your design needs.
  • Customizable Easing: Supports different easing functions to create more natural scrolling animations.
  • Orientation Support: Choose between horizontal and vertical scrolling.
  • Auto-Scrolling: Automatically scroll through content with loop or bounce modes.
  • Pause on Hover/Touch: Optionally pause scrolling when hovering or touching the scrollable area.
  • Manual Controls: Provide buttons for manual scrolling.
  • Loop and Bounce Modes: Scroll continuously in a loop or bounce back at the end of the content.
  • Touch Support: Fully supports touch events for mobile devices.
  • Customizable Styling: Easily customize the look and feel using CSS.

Installation

You can install the jquery-easyscroll package using npm:

npm install jquery-easyscroll

Alternatively, you can include the plugin and CSS directly in your HTML file:

<link rel="stylesheet" href="path/to/jquery.easyscroll.css">
<script src="path/to/jquery.easyscroll.min.js"></script>

Usage

After installing or including the plugin, you can use it in your project like this:

Basic Initialization

import EasyScroll from 'jquery-easyscroll';

$(document).ready(function() {
    $('.your-selector').easyScroll();
});

Or using the class directly:

$(document).ready(function() {
    new EasyScroll('.your-selector', {
        // your options here
    });
});

Example Usage

Here’s a more detailed example:

new EasyScroll('.scrollable-content', {
    customClass: 'custom-scroll',
    speed: 2,
    orientation: 'vertical',
    auto: true,
    autoMode: 'loop',
    direction: 'forwards',
    pauseOnHover: true,
    pauseOnTouch: true,
    startOnLoad: false,
    initialOffset: 100,
});

HTML Example

<div class="scrollable-content">
    <ul>
        <li>Item 1</li>
        <li>Item 2</li>
        <li>Item 3</li>
        <li>Item 4</li>
    </ul>
</div>

<link rel="stylesheet" href="path/to/jquery.easyscroll.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="path/to/jquery.easyscroll.min.js"></script>
<script>
    $(document).ready(function() {
        new EasyScroll('.scrollable-content', {
            customClass: 'custom-scroll',
            speed: 3,
            orientation: 'horizontal',
            auto: true,
            autoMode: 'bounce',
            direction: 'forwards',
            pauseOnHover: true,
        });
    });
</script>

CSS Customization

The jquery.easyscroll.css file provides a set of default styles that can be easily customized. Below are some key classes and how they are used:

Master Classes

  • .easy-scroll-container: The main container that wraps the entire scrollable content.
  • .easy-scroll-clip: A wrapper around the list that manages the overflow and hides the non-visible parts.
  • .easy-scroll-list: The list of items that scrolls.
  • .easy-scroll-btn: The buttons for manual control, like left/right or up/down.
  • .easy-scroll-btn-left, .easy-scroll-btn-right, .easy-scroll-btn-up, .easy-scroll-btn-down: Specific classes for directional buttons.

Example Markup for Horizontal Scroller

<div class="your-custom-class easy-scroll-container">
    <div class="easy-scroll-btn easy-scroll-btn-left"></div>
    <div class="easy-scroll-btn easy-scroll-btn-right"></div>
    <div class="easy-scroll-clip">
        <ul class="easy-scroll-list">
            <li>Item 1</li>
            <li>Item 2</li>
            <li>Item 3</li>
            <li>Item 4</li>
        </ul>
    </div>
</div>

Vertical Scroller Example

.vert {
    width: 340px;
    height: 400px;
    margin-bottom: 1.5em;
}

.vert .easy-scroll-clip {
    width: 290px;
    height: 400px;
}

.vert .easy-scroll-list li {
    width: 290px;
    height: 200px;
}

Customizing Buttons

The CSS file includes styles for customizing the buttons. You can replace buttons.png with your own button sprites or adjust the background-position values to match your custom sprites.

Example of Overriding Styles

.custom-scroll .easy-scroll-btn-left {
    background-image: url('path/to/your-custom-button.png');
}

.custom-scroll .easy-scroll-btn-right {
    background-image: url('path/to/your-custom-button.png');
}

License

This project is open-source and available under the MIT License.

Contribution

We welcome contributions! If you have ideas or improvements, feel free to submit a pull request or open an issue.

Credits

This plugin is developed and maintained by the Nishadil Developers Team, part of Nishadil's OpenSources projects.