GithubHelp home page GithubHelp logo

halfnhav4 / hook.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jordansinger/hook

0.0 2.0 0.0 257 KB

Pull to refresh. For the web.

Home Page: http://usehook.com

CSS 17.90% JavaScript 82.10%

hook.js's Introduction

Hook.js

Pull to refresh. For the web. This rewrite is a work in progress and has only been tested on the latest Safari, Chrome, and Firefox. There are a few bugs that I'm currently working through with Firefox.

##Dependency

  • Needs mousewheel.js, however will most likely change this to an option in future commits.

##There are 9 settings and 1 callback. Which are the following;

  • reloadPage: default is true, if false will reload element (note must also have reloadEl callback),
  • dynamic: default is true, if false you will need your own html,
  • textRequired: default is false, if true the dynamic text HTML will be added,
  • swipeDistance: default is 50, the amount of swipe distance on touch devices to fire reload,
  • loaderClass: default is hook-loader,
  • spinnerClass: default is hook-spinner,
  • loaderTextClass: default is hook-text,
  • loaderText: default is 'Reloading..' is only set when you set 'textRequired'
  • reloadEl: callback

##Outstanding issues:

  • Firefox reload only appearing after first scrolling down.

##ToDo's:

  • Convert from jQuery animate to css3 transitions for browsers that support it.

##Examples:

// No options
$('#hook').hook();

// Callback
$('#hook').hook({
  reloadPage: false,
  reloadEl: function(){
    console.log('Hello World!');
  }
});

hook.js's People

Contributors

jordansinger avatar paulmillr avatar agirton avatar

Watchers

James Cloos avatar Adam Turner avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.