Skip to content

bm12/jQ-plugin-mousePressCounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mouse Press Counter

RU-README

DEMO

Mouse Press Counter is a jQuery plugin to increase / decrease the number in the input when you press and hold the left mouse button.

Tested with jQuery version 1.7.0

Usage

You can simply include the plugin file after jQuery:

<script src="path/to/jquery.min.js"></script>
<script src="path/to/mousePressCounter.js"></script>

and init Mouse Press Counter with one line:

$('.wrapper').mousePressCounter();

Options

You're also able to use some of the options that let you customize it as you wish or keep them in the default value:

$('.wrapper').mousePressCounter({
    inc: '.counter-inc', // element for increasing the number
    dec: '.counter-dec', // element for decreasing the number
    counter:'.counter-input', // input to which the number will be output
    min: 0, // min number value
    max: Infinity, // max number value
    timeOut: 100, // interval between increasing number
    timeStep: 10 // how much to decrease the timeOut after every 5 iterations
});

About

Simple jQuery plugin for increment/decrement input on holding mouse button

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors