<commit_before># ScrollToggle
ScrollToggle is a small JavaScript component that lets you perform actions on elements depending on which direction the viewport is scrolled.

[DEMO](http://hiyermedia.com/angular-scroll-toggle/)

## How to use
Include the JS and CSS files, then inject the `angular-scroll-toggle` module into your app.

```javascript
var myApp = angular.module('myApp', ['count-to']);
```

Now you can apply the directive to any element.

```html
<div scroll-toggle> This is my element! </div>
```

## Callback
You can define your own callback function like so:
```html
<div ng-controller="myController">
	<div scroll-toggle="myCallback">{{scroll.direction}}</div>
</div>
```
```JavaScript
app.controller('myController', function($scope){
	$scope.scroll = {};
	$scope.scroll.direction;
	$scope.myCallback = function(direction, element){
		if(direction) $scope.scroll.direction = 'Down';
		else $scope.scroll.direction = 'Up';
	}<commit_msg>Updates reaadme<commit_after># ScrollToggle
ScrollToggle is a small JavaScript component that lets you perform actions on elements depending on which direction the viewport is scrolled.

[DEMO](http://hiyermedia.com/angular-scroll-toggle/)

## How to use
Include the JS and CSS files, then inject the `angular-scroll-toggle` module into your app.

```javascript
var myApp = angular.module('myApp', ['angular-scroll-toggle']);
```

Now you can apply the directive to any element.

```html
<div scroll-toggle> This is my element! </div>
```

## Callback
You can define your own callback function like so:
```html
<div ng-controller="myController">
	<div scroll-toggle="myCallback">{{scroll.direction}}</div>
</div>
```
```JavaScript
app.controller('myController', function($scope){
	$scope.scroll = {};
	$scope.scroll.direction;
	$scope.myCallback = function(direction, element){
		if(direction) $scope.scroll.direction = 'Down';
		else $scope.scroll.direction = 'Up';
	}
{'fraction_non_alphanumeric': 0.1419656786271451, 'fraction_numerical': 0.0, 'mean_word_length': 5.392026578073089, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '582516', 'n_tokens_mistral': 582, 'n_tokens_neox': 554, 'n_words': 187}