Created
June 25, 2013 14:30
-
-
Save omnikron/5858909 to your computer and use it in GitHub Desktop.
jQuery - live update while typing (just like Angular)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Show euro total when editing account payment plans | |
$(".input .integer[id^='account_payment_plans_attributes']").each -> | |
value = $(@).attr('value') / 100 / 1000 | |
$(@).parent().next('.euros').html(" = €#{$(@).attr('value') / 100 / 1000 }") | |
$(".input .integer[id^='account_payment_plans_attributes']").on 'keyup', -> | |
$(@).parent().next('.euros').html(" = €#{$(@).attr('value') / 100 / 1000 }") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment