Sha256: 27048171b928cc293781c634c53cc88a293aa6ad5842fe633c4b5991add29177

Contents?: true

Size: 1.01 KB

Versions: 95

Compression:

Stored size: 1.01 KB

Contents

/*
 * iscroll-wrapper for jQquery.
 * http://sanraul.com/projects/jqloader/
 * 
 * Copyright (c) 2011 Raul Sanchez (http://www.sanraul.com)
 * 
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 */

(function($){
  $.fn.iscroll = function(options){
    if(this.data('iScrollReady') == null){
      var that = this;
            var options =  $.extend({}, options);
        options.onScrollEnd = function(){
          that.triggerHandler('onScrollEnd', [this]);
        };
      arguments.callee.object  = new iScroll(this.get(0), options);
      // NOTE: for some reason in a complex page the plugin does not register
      // the size of the element. This will fix that in the meantime.
      setTimeout(function(scroller){
        scroller.refresh();
      }, 1000, arguments.callee.object);
      this.data('iScrollReady', true);
    }else{
      arguments.callee.object.refresh();
    }
    return arguments.callee.object;
  };
})(jQuery);

Version data entries

95 entries across 94 versions & 6 rubygems

Version Path
jinda-0.3.1 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.3.0 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.9 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.8 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.7 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.6 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.5 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.4 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.3 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.2 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.1 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.2.0 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.1.9 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.1.8 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.1.7 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.1.6.6 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.1.0 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.0.9 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.0.8 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.0.7 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js