I have a index view in a Rails 3 project where several line items are listed along with a corresponding count. For example:
Name Count -------------- Item A 10 Item B 278 Item c 64
The list is dynamic in length, however I know each item's id, and I have a partial which displays a passed-in count.
How would I change this setup to display the count via AJAX (jQuery)?
For example, I would want the intial spot where the count is to be a spinner. And the spinner would be replaced with the actual count after being triggered somehow. But I need this for each and every item in the list.
For your answer to be useful for me please provide detailed steps and sample code. Thank you!