Giter Club home page Giter Club logo

jquery-inputincremental's Introduction

jQuery - InputIncremental

Bower version

You can increment or decrement with buttons or keyboard

Inputs examples

Usage

<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>

<script type="text/javascript" src="../jquery.ba-throttle-debounce.min.js"></script>
<script type="text/javascript" src="../jquery.inputIncremental.js"></script>
<!-- OR -->
<script type="text/javascript" src="../jquery.inputIncremental.full.js"></script>
$(function(){
    $('.myInputs').inputIncremental();
    $('.myInputs2').inputIncremental({minVal: 1});
});

Demo

Install with bower

bower install jquery-inputincremental

Dependencies

Javascript

  • jQuery
  • jquery.ba-throttle-debounce (included in full version)

Options

  • value: number incrementation (default 1)
  • minVal (default 0)
  • maxVal (default null)
  • debounce (default 1000)
  • autocomplete (default false)
  • negative: authorize negative value (default false)
  • integer: force integer value (default false)

Metadata

  • data-value
  • data-min-val
  • data-max-val
  • data-debounce
  • data-theme
  • data-negative
  • data-integer

Themes with sass or compass

Default themes

<input type="text" class="inc" value="0"/>
<input type="text" data-theme="blueTheme" class="inc" />
<input type="text" data-theme="greenTheme" class="inc"/>

Create theme

main.scss

@import "inputIncremental/_style";

.orangeTheme { // name of theme
  @include createTheme($gradient1: #EAD66E, $gradient2: #D88316, $gradient3: #EAE56E, $border_color:#AF420E, $boxShadow: 1px 1px 6px #AF420E)
}
.redTheme {
  @include createThemeByColor(#F00);
}

jquery-inputincremental's People

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jquery-inputincremental's Issues

CSS improvements

Some improvements for the futur :

1: Remove compass dep (Bourbon for gradient) ?
2: Create CSS arrow instead of png
3: Arguments for creating themes should be optionnal or by default
4: Remove > .after &:after unless IE8 support after elem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.