pull-to-refresh-js

Pull-to-refresh feature for mobile Safari with native Scrolling

  • Owner: visiongeist/pull-to-refresh-js
  • Platform:
  • License::
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

pull-to-refresh.js

This plugin enables a pull-to-refresh functionality in mobile safari for scrollable block elements with native scrolling on iOS (!)

Just create this markup

<div class="scrollable">
    <div class="wrap">
    	<!-- Your content here -->
    </div>
</div>

and enable the plugin through passing a callback which returns a promise e.g.

$('.scrollable').pullToRefresh({
    callback: function() {
        var def = $.Deferred();
        
        setTimeout(function() {
            def.resolve();      
        }, 3000); 

        return def.promise();
    }
});

Don't forget to include jquery.plugin.pullToRefresh.js and pull-to-refresh.css

Works for iOS5 and newer.

Main metrics

Overview
Name With Ownervisiongeist/pull-to-refresh-js
Primary LanguageJavaScript
Program languageJavaScript (Language Count: 1)
Platform
License:
所有者活动
Created At2012-10-15 15:50:05
Pushed At2012-10-16 21:17:41
Last Commit At2012-10-17 00:17:41
Release Count0
用户参与
Stargazers Count320
Watchers Count8
Fork Count54
Commits Count5
Has Issues Enabled
Issues Count6
Issue Open Count6
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count1
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private