Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind increase and decrease to buttons. #2

Open
Smashr opened this issue Apr 23, 2013 · 3 comments
Open

Bind increase and decrease to buttons. #2

Smashr opened this issue Apr 23, 2013 · 3 comments

Comments

@Smashr
Copy link

Smashr commented Apr 23, 2013

We have two buttons in addition to the textarea / field, there's a "+" button and a "-". Is there a way to bind these to the "increase" and "decrease" functions on the textarea.

Currently we have a snippet of js that increases and decreases the values in the textarea when the buttons are clicked. But this does not respect the "min", "max", "step", and "shiftStep" properties set on the textarea/plugin.

It would be great if the plus and minus buttons could be bound to the increase and decrease functions in a way that they operate within the limits set by the min, max etc properties that are set on the field.

@Smashr
Copy link
Author

Smashr commented Apr 23, 2013

Example control :

Increment-Decrement

@nakupanda
Copy link
Owner

By default the plugin monitors only keyboard and mousewheel (and sorry to tell you this doesn't work on FireFox currently), I think attaching these functions to some buttons is not a big problem, you can try to do it yourself or I will take care of it later :)

Thanks

@nakupanda
Copy link
Owner

Without modifying any soruce code, I've updated the example page to show a case that you may like, see here:

http://jsfiddle.net/XCtaH/1/embedded/result/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants