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

Propose a focusin action on jquery.priceformat.js #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ahmfarisi
Copy link

I propose to add a focusin action on jquery.priceformat.js, exactly on bind the actions section

//bind the actions
obj.bind('keydown.price_format', key_check);
obj.bind('keyup.price_format', price_it);
obj.bind('focusout.price_format', price_it);
obj.bind('focusin.price_format', price_it);

This is simple, but useful when the project made a calculation and the result of calculation will be automatically put inside a textbox.

Example:
By adding the focusin action like what I proposed, the project just need to add a

document.getElementById("anyIDforResultTextBox").focus()

After that, the result of calculation will be following the needed priceformat on the textbox.

I propose to add a focusin event on jquery.priceformat.js

This is simple, but useful when the project made a calculation and the result of calculation will be automatically put inside a textbox.

Example:
By adding the focusin event like what I proposed, the project just need to add a

document.getElementById("anyIDforResultTextBox").focus()

After that, the result of calculation will be following the needed priceformat on the textbox.
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

Successfully merging this pull request may close these issues.

2 participants