After more than a week working on calx and do some testing with it, now I can proudly present the jQuery-Calx update, It has more new feature and more stable since the alpha version. Since this is in beta version, I am awaiting for your feedback to make the Calx more stable and of course, useful.
There is lot of new feature added to this version of Calx, such as aggregate function and conditional statement, and here is the complete list:
- Added conditional statement support, just write IF([condition],[true],[false]). You may also write nested conditional statement as deep as you want.
Sample code below is used to determine the discount value based on quantity purchasedXHTML1<input data-formula="IF($qty>20,0.1,0.2)" id="disc" data-format="0[.]00%" type="text" />
- Added new function support, including MIN, MAX, AVG and SUM, this function will only work if your id of the element mimic an Excel cell index, such as A1,A2,B4,C6 and so on, and can only accept single range. Just write MAX($A1,$A8) to find max value between A1 to A8.XHTML1<input type="text" id="A10" data-formula="MAX($A1,$A8)" >
- Added support for checkbox, radio button, select button, and other HTML element such as div, span, td, etc
- Added more method to enable or disable auto calculation.
- Include Numeral.JS as number formatter, it make the data-format attribute much simpler.
Contribute to Calx
Any contribution to the Calx will be much appreciated, please kindly fork it on https://github.com/ikhsan017/calx or open an issue if you found any bug.
For detailed documentation about Calx, please refer to this page ‘jQuery Calx – The jQuery Calculation Plugin‘. Hope this plugin will be useful for the community,
- Added new function support, including MIN, MAX, AVG and SUM, this function will only work if your id of the element mimic an Excel cell index, such as A1,A2,B4,C6 and so on, and can only accept single range. Just write MAX($A1,$A8) to find max value between A1 to A8.