Calculate Recipe Ingredients using jQuery
I am working on a food recipe site. I am giving an option to users to change the number of servings, accordingly I want to change all the ingredients value based on the servings.

i.e default display is 
servers 2 

and ingredients are as

4 pieces ginger
2 spoon salt

now when a user changes the serving  i.e. changes it to 1 and clicks the (change) text, the ingredient should become 
2 pieces ginger
1 spoon salt


my current code is
     
    Serving: <input type="text" name="serving" class="serving" value="5"/> persons

    <ul class="ingredients">
    <li class="ingredient">
     <input type="text" name="ingredient" class="ingredient" value="4"disabled="disabled"/>
     <input type="text" name="ingredient" class="ingredient" value="6"disabled="disabled"/>
     <input type="text" name="ingredient" class="ingredient" value="8"disabled="disabled"/>
     <input type="text" name="ingredient" class="ingredient" value="2"disabled="disabled"/>
    </li></ul>

i need a jquery function calculate and change all input values accordingly

thanks and regards

Calculate Recipe Ingredients using jQuery
===

I am working on a food recipe site. I am giving an option to users to change the number of servings, accordingly I want to change all the ingredients value based on the servings.

i.e default display is 
servers 2 

and ingredients are as

4 pieces ginger
2 spoon salt

now when a user changes the serving  i.e. changes it to 1 and clicks the (change) text, the ingredient should become 
2 pieces ginger
1 spoon salt


my current code is
     
    Serving: <input type="text" name="serving" class="serving" value="5"/> persons

    <ul class="ingredients">
    <li class="ingredient">
     <input type="text" name="ingredient" class="ingredient" value="4"disabled="disabled"/>
     <input type="text" name="ingredient" class="ingredient" value="6"disabled="disabled"/>
     <input type="text" name="ingredient" class="ingredient" value="8"disabled="disabled"/>
     <input type="text" name="ingredient" class="ingredient" value="2"disabled="disabled"/>
    </li></ul>

i need a jquery function calculate and change all input values accordingly

thanks and regards
