Auto Update Formula After User Input


#1

I cannot figure out how to make my calculation update as the user fills in their information. This is what I have… Any help is very appreciated.

edit: http://codepen.io/esaunde1/pen/tzDuh


#2

Try changing $(’#total’).text(totalPlusTip); to $(’#total’).val(totalPlusTip);

I’m assuming “total” in an input field. If that doesn’t work, please post the html that accompanies this in a codepen.


#3

I put it up. Thanks.


#4

I’ll try to look at it but when I started with ionic and angular I found this post to be very helpful.

Doing what you want with pure angular is a lot easier to update live then with jquery


#5

I added a reference to jquery and it worked.

<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>  

Also, I would recommend using angular and ionic.


#6

haha. sorry about that