<commit_before>Successor
================

![Example gif. A save button is clicked and a message appears and disappears.](https://raw.githubusercontent.com/chrishalebarnes/successor/master/successor.gif?raw=true)

Successor is a [knockout](http://knockoutjs.com/) binding handler that displays the result of some action in a nearby html element. Just set ```this.success(true)``` in the view model and the element will animate in and fade away.

## Getting Started
If using [require.js](http://requirejs.org/), you can require successor like this:
```
define(['/path/to/knockout', '/path/to/knockout.successor'], function(ko) {
    //Get or define the view model and bind it
});
```

Given HTML like this:
```
<span data-bind="successor: {}"></span>
<button data-bind="click: save">Save</button>
```

And a view model like this:
```
var ViewModel = function () {
    var self = this;
    this.success = ko.observable(false);
    this.failure = ko.observable(false);

    self.save = function () {
        //Save the data, set success or failure to true<commit_msg>Fixed typo in the path to the example gif<commit_after>Successor
================

![Example gif. A save button is clicked and a message appears and disappears.](https://raw.githubusercontent.com/chrishalebarnes/successor/master/example.gif?raw=true)

Successor is a [knockout](http://knockoutjs.com/) binding handler that displays the result of some action in a nearby html element. Just set ```this.success(true)``` in the view model and the element will animate in and fade away.

## Getting Started
If using [require.js](http://requirejs.org/), you can require successor like this:
```
define(['/path/to/knockout', '/path/to/knockout.successor'], function(ko) {
    //Get or define the view model and bind it
});
```

Given HTML like this:
```
<span data-bind="successor: {}"></span>
<button data-bind="click: save">Save</button>
```

And a view model like this:
```
var ViewModel = function () {
    var self = this;
    this.success = ko.observable(false);
    this.failure = ko.observable(false);

    self.save = function () {
        //Save the data, set success or failure to true
{'fraction_non_alphanumeric': 0.14948932219127206, 'fraction_numerical': 0.0, 'mean_word_length': 4.217917675544794, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '7070645', 'n_tokens_mistral': 656, 'n_tokens_neox': 623, 'n_words': 223}