New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pulr

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pulr

a minimal pull down control

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

pulr

pulr is a very minimal touch enabled pull down control

just 110 lines of es5 code :) Imagine if we wrote it in es6?

Uses hammer.js so it works the same on the web as on mobile.

Installation

npm install pulr --save

Usage

  • add some html

your pulr content, the pulr wrapper, and all your other content below...

 <div id="pulr"> 
    <div class="pulr-content">
    Here is some content for your
    </div>

    <svg class="pulr-button" height="20" width="20"><line x1="0" y1="0" x2="20" y2="0" style="stroke:#ff0000;stroke-width:5" /></svg>
</div>

<div class="below-content">
    You can push me down!
</div>

<script src="/scripts/bundle.js"></script>
  • now some javascript

using node / commonJs

Use browserify or webpack to bundle your main file below to bundle.js

var pulr = require('../js/main.js');

document.addEventListener('DOMContentLoaded', function () {
    var options = {resistance: 1.5}
    pulr(options);
});
  • you need some very minimal css

style.css

License

MIT

Keywords

pulr

FAQs

Package last updated on 09 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts