How to call function

How to call function

In JavaScript I have a function


function is_decimal(inputbox) {
        var teststring
        teststring = trim(inputbox.toString())
        if (teststring == "") {return false}
        for (var i = 0; i <  teststring.length; i++) {
            var c = teststring.charAt(i)
            if (c != "0" & c != "1" & c != "2" & c != "3" & c != "4" & c != "5" & c != "6" & c != "7" & c != "8" & c != "9" & c != "."){return false;}
        }
        return true
    }


    

That gets called by something like if (!(the_number)) {...... }



How do I do something like that in JQuery to test the contents of something?


Thanks