jQiMath

Introduction

jQiMath is a wrapper for basic math operations. The advantage of the plugin is easy to use and customizable design.

for more info https://github.com/madhugb/jQiMath

Syntax

var result = $.iMath(operation,operand1,operand2);

Operation

+ - * / % && || ^

or you can also use it like

add, subtract, multiply , divide , mod , AND , OR , XOR

**  Operand1**

This is mandatory, it should be either integer or float,

This can be array for add and subtract operations. (operand 2 will be ignored in this case)

Operand2

Should be integer or float

Result

Result can be integer or float,

it will return ‘error’ in case of any error

Invoking

You can use this in 2 ways

Extending jquery’s $ symbol :

<br></br>
var A = 10, B = 20, C;<br></br>
C = $.iMath('+', A, B);<br></br>```
  
***Accessing as a normal plugin:***  




$('#result').iMath('+', A , B);


// the result will be appended to $('#result') element

```

Download Source at  https://github.com/madhugb/jQiMath