JCalculator

In a nutshell, jCalculator provides simple yet customizable calculator for a web application.

UsageJCalculator Basic Usage

$().ready(function() {
$(‘#example1′).calculator();
});

JCalculator Options

defaultOpen: defaults to true
the default state of calculator when it is loaded.
title: defaults to ‘Calculator’
the title of the calculator.
accuracy: defaults to 12
the number of digits to accept as input for the calculator.
width: defaults to 164,
the width of calculator.
height: defaults to 180
the height of calculator
movable: defaults to  false
whether the calculator is draggable or not [works only if jQuery UI is included in the page]
resizable: defaults to false
whether the calculator is resizable or not [works only if jQuery UI is included in the page]

JCalculator Events
buttonPressed: Supply a callback function to handle the event when a button is pressed by user
$( ".selector" ).calculator({
   buttonPressed: function(calc, button) { ... }
});
displayChanged: Supply a callback function to handle the event when the display of calculator is changed
$( ".selector" ).calculator({
   displayChanged: function(calc, button) { ... }
});

Similar Posts