Bingo. Thanks all for you straightforward answers. This had been
dogging me for days.
Thanks!
On Aug 3, 5:12 pm, Peter Edwards wrote:
> Hi Nick
>
> $(".number").html(count--);
>
> count-- decrements your count variable after it has passed its value to
> the $.html() function.
> use --count
>
>
The problem is in how you're applying the decrement operator. If you
put it at the end of the number, as in:
number--
Then, the current number will be returned, THEN decremented. That's
what's happening here.
Simply put the operator before the number, so it is decremented THEN
returned.
$('.nu
Hi Nick
$(".number").html(count--);
count-- decrements your count variable after it has passed its value to
the $.html() function.
use --count
Peter
on 03/08/2009 21:15 littlerobothead said::
I have a status area in an app I'm working on. It shows the number of
unread alerts. As the user c
3 matches
Mail list logo