<commit_before># SwipeEvent v0.3.1

[![Build Status](https://travis-ci.org/kt3k/SwipeEvent.svg?branch=master)](https://travis-ci.org/kt3k/SwipeEvent)

> Handle swipe events

# Usage

Load script:

```html```
<script src="path/to/swipe-event.js"></script>
```

Bind events:

```
var dom = getDom();

var swipe = new SwipeCross({elm: dom});
swipe.bindEvents();
```

You'll get `swipeup`, `swipeleft`, `swiperight`, `swipedown` events when the specified dom are swiped:

```
// you can handle the following events
dom.addEventListener('swipeup', function () {...}, false);
dom.addEventListener('swipeleft', function () {...}, false);
dom.addEventListener('swiperight', function () {...}, false);
dom.addEventListener('swipedown', function () {...}, false);
```

You can unbind events when it become unnecessary:

```
swipe.unbindEvents();
```

If you have jquery loaded, you can bind events through jquery object:

```
$('#swipe').swipeCross();

$('#swipe').on('swipeup', function () {...});
$('#swipe').on('swipeleft', function () {...});
$('#swipe').on('swiperight', function () {...});
$('#swipe').on('swipedown', function () {...});

...

$('#swipe').swipeCrossUnbind();
```<commit_msg>Update History<commit_after># SwipeEvent v0.3.1

[![Build Status](https://travis-ci.org/kt3k/SwipeEvent.svg?branch=master)](https://travis-ci.org/kt3k/SwipeEvent)

> Handle swipe events

# Usage

Load script:

```html```
<script src="path/to/swipe-event.js"></script>
```

Bind events:

```
var dom = getDom();

var swipe = new SwipeCross({elm: dom});
swipe.bindEvents();
```

You'll get `swipeup`, `swipeleft`, `swiperight`, `swipedown` events when the specified dom are swiped:

```
// you can handle the following events
dom.addEventListener('swipeup', function () {...}, false);
dom.addEventListener('swipeleft', function () {...}, false);
dom.addEventListener('swiperight', function () {...}, false);
dom.addEventListener('swipedown', function () {...}, false);
```

You can unbind events when it become unnecessary:

```
swipe.unbindEvents();
```

If you have jquery loaded, you can bind events through jquery object:

```
$('#swipe').swipeCross();

$('#swipe').on('swipeup', function () {...});
$('#swipe').on('swipeleft', function () {...});
$('#swipe').on('swiperight', function () {...});
$('#swipe').on('swipedown', function () {...});

...

$('#swipe').swipeCrossUnbind();
```

# History

- 2014-11-04   v0.3.1    iOS8 Safari support.
{'fraction_non_alphanumeric': 0.23386765310316482, 'fraction_numerical': 0.009042334566378957, 'mean_word_length': 4.893462469733656, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, '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': '2157420', 'n_tokens_mistral': 856, 'n_tokens_neox': 832, 'n_words': 181}