<commit_before># pull-to-reload 
This is a pull to refresh implementation for the web. Designed to work with both mobile and websites. *Configurable to the seventh degree.*

### Preview 

<img src="https://fat.gfycat.com/AnyHeartfeltBarnswallow.gif" style="height: 300px;" alt="Functionality demo">

### Install 
Add `pull-to-reload.js` to your project. 

### Usage 
Quick example: 

**Html**

```html
<div id="ptr">
    ...
</div>

<div id="content">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores doloribus harum sed odit optio, fuga nam modi quod beatae? Tempore sunt molestiae, soluta quas unde exercitationem, modi accusamus pariatur reiciendis!
</div>
```

**Javascript**

```javascript
$(document).ready(function(){
    var ptr = new PullToReload({ 
        'callback-loading': function(){
            setTimeout(function(){
                ptr.loadingEnd();
            }, 5000);
        }
    });
});

```


Available options:

```
this.opts = {
        'refresh-element': 'ptr', //Required
        'content-element': 'content', //Required
        'border-height': 1,
        'height': 80,
        'font-size': '30px',
        'threshold': 20,
        'pre-content': '...',
        'loading-content': 'Loading...',
        'callback-loading': function(){ setTimeout(function(){ self.loadingEnd(); }, 1000); } //Required
    }
```


### Dependencies
* jQuery 



### Contribute
If you have the time, these features are requested:

* Remove jQuery-dependency
* Better README<commit_msg>Remove request to remove jQuery<commit_after># pull-to-reload 
This is a pull to refresh implementation for the web. Designed to work with both mobile and websites. *Configurable to the seventh degree.*

### Preview 

<img src="https://fat.gfycat.com/AnyHeartfeltBarnswallow.gif" style="height: 300px;" alt="Functionality demo">

### Install 
Add `pull-to-reload.js` to your project. 

### Usage 
Quick example: 

**Html**

```html
<div id="ptr">
    ...
</div>

<div id="content">
    Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolores doloribus harum sed odit optio, fuga nam modi quod beatae? Tempore sunt molestiae, soluta quas unde exercitationem, modi accusamus pariatur reiciendis!
</div>
```

**Javascript**

```javascript
$(document).ready(function(){
    var ptr = new PullToReload({ 
        'callback-loading': function(){
            setTimeout(function(){
                ptr.loadingEnd();
            }, 5000);
        }
    });
});

```


Available options:

```
this.opts = {
        'refresh-element': 'ptr', //Required
        'content-element': 'content', //Required
        'border-height': 1,
        'height': 80,
        'font-size': '30px',
        'threshold': 20,
        'pre-content': '...',
        'loading-content': 'Loading...',
        'callback-loading': function(){ setTimeout(function(){ self.loadingEnd(); }, 1000); } //Required
    }
```


### Dependencies
* jQuery 



### Contribute
If you have the time, these features are requested:

* Better README
{'fraction_non_alphanumeric': 0.15348991068475024, 'fraction_numerical': 0.011908699966920278, 'mean_word_length': 3.0052980132450333, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '435242', 'n_tokens_mistral': 1002, 'n_tokens_neox': 912, 'n_words': 267}