Skip to content

Commit

Permalink
Bump v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
vsn4ik committed Feb 24, 2020
1 parent 5b3bb9e commit bcef83a
Show file tree
Hide file tree
Showing 23 changed files with 105 additions and 423 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/node_modules/
/dist/
/*-dist.zip
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing

## Important notes
Please don't edit files in the `dist` subdirectory as they are generated via Grunt. You'll find source code in the `less` and `js` subdirectories!
Please don't edit files in the `dist` subdirectory as they are generated via Grunt. You'll find source code in the `src` subdirectory!

### Code style
Regarding code style like indentation and whitespace, **follow the conventions you see used in the source already.**
Expand All @@ -20,6 +20,6 @@ First, ensure that you have the latest [Node.js](https://nodejs.org) and [npm](h
1. Add failing tests for the change you want to make. Run `npm run test` to see the tests fail.
1. Fix stuff.
1. Run `npm run test` to see if the tests pass. Repeat steps 2-4 until done.
1. Open `js/tests/index.html` unit test file(s) in actual browser to ensure tests pass everywhere.
1. Open `tests/index.html` unit test file(s) in actual browser to ensure tests pass everywhere.
1. Update the documentation to reflect any changes.
1. Push to your fork and submit a pull request.
44 changes: 22 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# [jQuery Spinner](https://vsn4ik.github.io/jquery.spinner/)
# [Input Spinner](https://vsn4ik.github.io/input-spinner/)

[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![Build Status](https://github.com/vsn4ik/jquery.spinner/workflows/Test/badge.svg)](https://github.com/vsn4ik/jquery.spinner/actions?workflow=Test)
[![devDependency Status](https://david-dm.org/vsn4ik/jquery.spinner/dev-status.svg)](https://david-dm.org/vsn4ik/jquery.spinner?type=dev)
[![Build Status](https://github.com/vsn4ik/input-spinner/workflows/Test/badge.svg)](https://github.com/vsn4ik/input-spinner/actions?workflow=Test)
[![devDependency Status](https://david-dm.org/vsn4ik/input-spinner/dev-status.svg)](https://david-dm.org/vsn4ik/input-spinner?type=dev)


A Number-Spinner based-on jQuery, Support Keyboard operations and continuous changing.
A Number-Spinner, Support keyboard operations and continuous changing.

## Basic usage, it's very simple
```html
<!-- // ref javascript file -->
<script src="dist/js/jquery.spinner.js"></script>
<script src="dist/input-spinner.js"></script>

<!-- // spinner plugin DOM -->
<div data-trigger="spinner">
Expand All @@ -27,16 +27,16 @@ In your web page:

```html
<script src="jquery.js"></script>
<script src="dist/js/jquery.spinner.js"></script>
<script src="dist/input-spinner.js"></script>
<script>
$("#spinner")
.spinner('delay', 200) //delay in ms
.spinner('changed', function(e, newVal, oldVal) {
// trigger lazed, depend on delay option.
})
.spinner('changing', function(e, newVal, oldVal) {
// trigger immediately
});
$('#spinner')
.spinner('delay', 200) //delay in ms
.spinner('changed', function(e, newVal, oldVal) {
// trigger lazed, depend on delay option.
})
.spinner('changing', function(e, newVal, oldVal) {
// trigger immediately
});
</script>

<div data-trigger="spinner" id="spinner">
Expand Down Expand Up @@ -89,10 +89,10 @@ Usage:

## Examples

### Work with Bootstrap 3 and Font Awesome 4
### Work with Bootstrap and Font Awesome

```html
<link href="dist/css/bootstrap-spinner.css" rel="stylesheet">
<link href="dist/input-spinner.css" rel="stylesheet">

<div class="input-group spinner" data-trigger="spinner">
<input type="text" class="form-control text-center" value="1" data-rule="quantity">
Expand Down Expand Up @@ -125,7 +125,7 @@ Usage:
</div>

<script>
$("#spinner").spinner('changing', function(e, newVal, oldVal) {
$('#spinner').spinner('changing', function(e, newVal, oldVal) {
$('#spinner-value').html(newVal);
});
</script>
Expand All @@ -134,7 +134,7 @@ Usage:
#### pass step options as a function
```javascript
// To skip 0
$("#spinner").spinner({
$('#spinner').spinner({
step: function(dir) {
// 'this' references to the spinner object
if ((this.oldValue === 1 && dir === 'down') || (this.oldValue === -1 && dir === 'up')) {
Expand All @@ -145,7 +145,7 @@ $("#spinner").spinner({
});

// or use API syntax
$("#spinner").spinner('step', function(dir) {
$('#spinner').spinner('step', function(dir) {
// your logic here
});
```
Expand All @@ -158,6 +158,6 @@ Copyright xixilive, 2013&ndash;2015

Licensed under [the MIT License][license].

[license]: https://github.com/vsn4ik/jquery.spinner/blob/master/LICENSE
[development]: https://raw.githubusercontent.com/vsn4ik/jquery.spinner/master/dist/js/jquery.spinner.min.js
[production]: https://raw.githubusercontent.com/vsn4ik/jquery.spinner/master/dist/js/jquery.spinner.js
[license]: https://github.com/vsn4ik/input-spinner/blob/master/LICENSE
[development]: https://raw.githubusercontent.com/vsn4ik/input-spinner/master/dist/input-spinner.min.js
[production]: https://raw.githubusercontent.com/vsn4ik/input-spinner/master/dist/input-spinner.js
1 change: 0 additions & 1 deletion dist/css/bootstrap-spinner.min.css.map

This file was deleted.

253 changes: 0 additions & 253 deletions dist/js/jquery.spinner.js

This file was deleted.

Loading

0 comments on commit bcef83a

Please sign in to comment.