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.5.0 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.9 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.8 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.7 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.6 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-5-0.4.5 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.5 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.4 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.3 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.2 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.1 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.4.0 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.3.9 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.3.8 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.3.7 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.3.6 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.3.5 lib/generators/jinda/templates/app/assets/javascripts/iscroll-wrapper.js
jinda-0.3.4 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.3.3 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js
jinda-0.3.2 lib/generators/jinda/templates/app/assets/javascripts/jqm/iscroll-wrapper.js