[jQuery] Re: Rounding numbers

2009-11-18 Thread cfred
Thanks a lot. that worked. I think you meant "Math.ceil" which did the trick. On Nov 16, 7:34 pm, PiotrJaniak wrote: > OK; here u  go: > > $("#insulBlocks").html(Match.ceil(parseInt($("#totalArea").html()) / . > 889 * 2)); > > $("#8Blocks").html(Match.ceil(parseInt($("#insulBlocks").html()) * .2

[jQuery] Re: Rounding numbers

2009-11-16 Thread Dave Methvin
Try this var test = 3.141592; alert(test.toFixed(2));

[jQuery] Re: Rounding numbers

2009-11-16 Thread PiotrJaniak
OK; here u go: $("#insulBlocks").html(Match.ceil(parseInt($("#totalArea").html()) / . 889 * 2)); $("#8Blocks").html(Match.ceil(parseInt($("#insulBlocks").html()) * .25 * 100) / 100); $("#10Blocks").html(Match.ceil(parseInt($("#insulBlocks").html()) * . 35 * 100) / 100); $("#12Blocks").html(Match

[jQuery] Re: Rounding numbers

2009-11-16 Thread cfred
Yes, I tried what other posts said without luck. Which is why I posted my code to see if someone would be kind enough to help. Thanks. On Nov 16, 5:34 pm, PiotrJaniak wrote: > Hi, > > there is a search box in the top right of this page;) > > http://groups.google.com/group/jquery-en/browse_thread/

[jQuery] Re: Rounding numbers

2009-11-16 Thread PiotrJaniak
Hi, there is a search box in the top right of this page;) http://groups.google.com/group/jquery-en/browse_thread/thread/e819cef9e28502b0# On 16 Lis, 05:02, cfred wrote: > I am having trouble rounding numbers in the code below. I would like > "insulBlocks" to round up to a whole number and "8Blo

[jQuery] Re: Rounding numbers

2008-11-19 Thread less than zero
Great, thanks for the help. Hector Virgen wrote: > > Math.ceil() should do the trick: > Math.ceil(3.); // 4 > Math.ceil(3.0); // 3 > > -Hector > > > On Wed, Nov 19, 2008 at 8:22 AM, Pierre Bellan <[EMAIL PROTECTED]> wrote: > >> Hi, >> >> In javascript, you have the Math object. This is

[jQuery] Re: Rounding numbers

2008-11-19 Thread Hector Virgen
Math.ceil() should do the trick: Math.ceil(3.); // 4 Math.ceil(3.0); // 3 -Hector On Wed, Nov 19, 2008 at 8:22 AM, Pierre Bellan <[EMAIL PROTECTED]> wrote: > Hi, > > In javascript, you have the Math object. This is the perfect solution for > your problem > > Bye > Pierre > > Lily Tomlin -

[jQuery] Re: Rounding numbers

2008-11-19 Thread Pierre Bellan
Hi, In javascript, you have the Math object. This is the perfect solution for your problem Bye Pierre Lily Tomlin - "The trouble with the rat race is that even if you win, you're still a rat." 2008/11/19 less than zero <[EMAIL PROTECTED]> > > > Hi, > > Is there any way to round the value of a