Skip to content

Instantly share code, notes, and snippets.

@lscott3
Created October 31, 2013 02:53
Show Gist options
  • Save lscott3/7243717 to your computer and use it in GitHub Desktop.
Save lscott3/7243717 to your computer and use it in GitHub Desktop.
calculatePrice = (selector) ->
total = 0.00
$.each $(selector), (index, value) ->
num = parseFloat($(this).html(), 10)
total = Math.round((total + num) * 1e10) / 1e10
total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment