I would like to give points to my users who submit articles based on their articles word count.
But my page has many text area fields. Lets say message1,message2,message3
When the user fill textarea(message1,message2,message3) it will show like this in the bottom.
You have typed x words. Points per word : 0.2. Estimated point: xx
I also want to calculate overall points. So i would like to add points of message1,message2,message3 and display it as overall points.
I’m a jquery noob. So i’m not sure which variable i should call.
Here is the jfiddle code what i have so far.
Can someone help me? Thanks
Your first problem is that you’re not storing the scores from the individual text area fields so you have no values to add up for the total score. After you start storing this data, you just have to update the total score area when any of the individual scores change.
Check out this fiddle: http://jsfiddle.net/NFDQ3/6/