mkPullFresh: Pull to refresh jQuery plugin for mobile and desktop

Pull to refresh jQuery plugin for mobile and desktop devices with CSS animation. Extremely simple usage. Asynchronous stop. Fully customizable. Material design included.

Download: https://github.com/m-kant/mk-pullfresh

Demonstration: http://mkant.ru/mink-js/mk-pullfresh/

Plugin homepage: http://mkant.ru/mink-js/mk-pullfresh/

Implementation:

$('.pulled').mkPullFresh([refresh][,options]);

refresh – is a callback with only argument ‘end’ – a function, you need to call to stop pending state of plugin

options – is a javascript object

Options:

maxShiftIntegerDefault : 100 – maximum offset in pixels to pull element down
readyShiftIntegerDefault : 50 – offset in pixels to be ready for refresh
pendingShiftIntegerDefault : 50 – offset in pixels in pending state
refreshFunctionDefault : null – Callback function
indicatorHtmlStringDefault :  – Html code of pull-to-refresh indicator
emitEventsBooleanDefault : false – if true, will emit following events on puller

Methods

destroyFunctionReturns : undefined – destroys the plugin instance
getFunctionReturns : mkPullFresh – returns plugin instance on current element

Screenshots

pulling state
pending state
pulling state with content offset

Creating a JavaScript Library

I recently wrote a JavaScript library for creating random colors and color schemes, and while I foun…

s3Slider jQuery Plugin & Tutorial

The s3Slider jQuery plugin is made by example of jd`s smooth slide show script. Usage: HTML: Sample …

jQuery Optimization: Avoid Unnecessary Selector

Common subexpression elimination is a common way to optimize any programming code. Doing unnecessary…

Fading Links Using jQuery: dwFadingLinks

Earlier this month, we posted a MooTools script that faded links to and from a color during the mous…

jQuery Flash Plugin

This jQuery plugin is for embedding Flash movies. Pages are progressively enhanced when Flash and Ja…

jQuery Optimization: Optimize Selector

We can also optimize our selector other than being a bit specific on our selector. The key to optimi…

jQuery drop down menu: droppy

Quick and dirty nested drop-down menu in the jQuery style. I needed a nav like this for a recent pro…