You might find "Masked Input" plugin useful:
http://digitalbush.com/projects/masked-input-plugin/

Also on creating your custom jQuery plugins:
http://jquery-howto.blogspot.com/search/label/plugin



On Sat, Feb 7, 2009 at 2:10 AM, webopolis <krodenho...@gmail.com> wrote:
>
> I've done this with straight Javascript for years, I just thought with
> all the other cool things that have been done with jquery, there would
> be a plugin for this as well. Thanks for the help.
>
> Kevin
>
> On Feb 6, 3:52 pm, sem101 <semiotics...@gmail.com> wrote:
>> You don't need jQuery for math, it's simple JavaScript. But -- you can
>> use jQuery to get elements of your forms....
>>
>> var qty = parseInt($('input#qty').val()) || 0;
>> var product1 = parseFloat($('input#product1').val()) || 0;
>> var discount = parseFloat($('input#discount').val()) || 0;
>> var grandtotal = (qty * product1) - discount;
>>
>> $("div#total").html('<h1>$' + grandtotal.toFixed(2) + '</h1>');
>>
>> This would roughly create variables to hold your form input values,
>> then show the grandtotal in a div called #total. You can grasp the
>> concept.The things to look up are Floating Point, Integers and
>> Decimals, etc.
>>
>> http://www.w3schools.com/js/default.asp
>>
>> On Feb 6, 3:13 pm, webopolis <krodenho...@gmail.com> wrote:
>>
>>
>>
>> > How do I add/subtract currency with jquery?- Hide quoted text -
>>
>> - Show quoted text -

Reply via email to