I have written some code in jQuery to calculate total number value of the divs that have been moved inside div.cart using the insertAfter function. However jquery refuses to return the sum.
The same code works if i use it to calculate sum while div.product are inside the original container and have not been clicked on yet. Why ? What am i doing wrong ?
NOTE : My goal is to only calculate sum of div’s with .price class that have been moved inside div.cart by clicking on them.
Please see the issue here : http://jsfiddle.net/5r1t387v/