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…

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…

jQuery slideViewerPro: A “pro” jQuery image slider

slideViewerPro is a fully customizable jQuery image gallery engine which allows to create outstandin…

jQuery Optimization: Avoid Unnecessary Styling

This is another common mistake that many jQuery developer made. jQuery provides us with the ability …