views:

363

answers:

2

I'm not able to get this to work at all.

Getting not defined for all of the available functions.

Everything is loaded correctly too.

Here is the link to the example.

Thanks,

Mike

A: 

Guessing what you are trying to do without much info from your question:

I think you first problem is that you are using the "keydown" event when you really want the "keyup" event:

$(".sumit").sum("keyup", "#totalSum");

That should help you with the numbers not updating correctly.

Looks like the other problem you are having is trying to limit the user to only entering numeric characters. You could write your own code using the

$(".submit").keyup(function(event){
    var key=event.keyCode;
    if (key >=48 && key <= 57) return true;
    return false;
});

Or you could use one of the many other plugin's that already deal with this problem like: http://www.texotela.co.uk/code/jquery/numeric/

PetersenDidIt
A: 

It wasn't that. I was doing everything right. The problem was the .js file I downloaded. Something was wrong with it. I downloaded the .min.js file and everything magically worked!

Thanks anyways!

Michael Stone