var num = 3168; $('#myElement').text(Math.round(num/100));
I assume you mean divide by 100, then round? Or did you mean decimal places? (In this case, remove the /100 part)
Also, this is just basic JavaScript. As another user noted, jQuery should work with the document itself, and not perform mathematical operations.
And here is a fragment from the jQuery 1 math library:
(function($){ $.round = Math.round; })(jQuery); $.round(3168 / 100)
1 For humor only - this functionality is provided by JavaScript itself.
source share