Submit your widget

Useful jquery-blackCalculator plugin

Created 11 years ago   Views 6806   downloads 2609    Author rcoelros
Useful  jquery-blackCalculator plugin
View DemoDownload
29
Share |

blackCalculator is a jQuery plugin for create a calculator. It supports CSS customization, easy translation, two options of calculators, cross-browser, allow and disallow keyboard!

Usage

First, include all the dependencies in your head tag:

<script type="text/javascript" src="jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="jquery.blackcalculator-1.0.min.js"></script>

Make sure that: black_calculator.css, black_calculator_ie.css and PIE.htc are inside the folder "css/" (you can change the folder with the parameter called "css")

Now we call the method "blackCalculator" on an empty DIV, with only one line will be running your calculator:

<div class="calculator"></div>
<script type="text/javascript">
$(document).ready(function(){
   $('.calculator').blackCalculator();
});
</script>

Example call by changing the parameters:

<div class="calculator"></div>
<script type="text/javascript">
$(document).ready(function(){
   var langs = {value: 'Valor', clear: 'Limpar', backspace: 'Voltar'};
   $('.calculator').blackCalculator({type:'advanced', allowKeyboard:true, css:'styles/', language:langs});
});
</script>

Read  more:https://github.com/rcoelros/jquery-blackCalculator