Original Price = Sale Price / Difference
Here’s an example: $50 / (1 – 0.2 = 0.8) = $62.50
The sale price is $50. The discount is %20 percent. First we subtract the discount 0.2 from 1 resulting in 0.8. Dividing the sale price by that number results in the original price of $62.50. Continue reading Calculate original price before discount percentage
Ever have an element with clipped content and wanted to know the total height of the elements contained therein? I have a client who wants the height of the main content to be clipped to a preset height (don’t ask me why). Which means I need to dynamically add a “read more” link to expand the container and show all the content.
Well, here’s how you calculate the combined height of the children with jQuery… Continue reading Calculate the total height of child elements of a clipped (overflow: hidden) parent tag
Simply enter an amount into either field and the conversion is automatic.
PS: If you leech my code, at least link to me for credit 😉