Fixed http://dev.jquery.com/ticket/3053
Thanks
--
Ariel Flesler
http://flesler.blogspot.com/
On 17 jun, 00:57, "Morgan Allen" <[EMAIL PROTECTED]> wrote:
> This has to do with the way JS evaluates true and false with 0. !0 == true.
> The simple fix is passing String(0), line 964 (in current svn)
> I have noticed another really strange bug(?) here, numbers with a leading
> zero come out wrong. like 0123 ends up as 83. Stranger yet, 18 is 18, 19 is
> 19 but 20 is 16? But it does not appear to be jQuery.
Leading zeros indicate the JS Interpreter that the number is octal,
that is, base 8.
Sa
If you just want to insert numbers try .text() instead of .html() ?
On Jun 17, 5:57 am, "Morgan Allen" <[EMAIL PROTECTED]> wrote:
> This has to do with the way JS evaluates true and false with 0. !0 == true.
> The simple fix is passing String(0), line 964 (in current svn) is the
> problem, if(!el
I have noticed another really strange bug(?) here, numbers with a leading
zero come out wrong. like 0123 ends up as 83. Stranger yet, 18 is 18, 19 is
19 but 20 is 16? But it does not appear to be jQuery.
On Mon, Jun 16, 2008 at 8:57 PM, Morgan Allen <[EMAIL PROTECTED]>
wrote:
> This has to do wit
I would take it as undesired behaviour. but the reason is obvious.
So, if the .html(number) is variable, you could workaround it by
forcing it to eval as string: .html("" + number)
I'm not sure, but it seems to be ok.
Iair.
On 16 jun, 21:02, Lowell <[EMAIL PROTECTED]> wrote:
> When I call html(5)
This has to do with the way JS evaluates true and false with 0. !0 == true.
The simple fix is passing String(0), line 964 (in current svn) is the
problem, if(!elem) return, change that to if(!elem && elem !== 0) return. I
will check for a bug report and submit a patch.
On Mon, Jun 16, 2008 at 5:02
That seems to be a glitch due to the falsyness of 0. Try passing in a
string in the first place, this is what html expects anyway.
$('#foo').html('0');
--Klaus
On 17 Jun., 02:02, Lowell <[EMAIL PROTECTED]> wrote:
> When I call html(5) it will set the innerHtml of my element(s) to "5".
> Howeve
On 17 Giu, 02:02, Lowell <[EMAIL PROTECTED]> wrote:
> When I call html(5) it will set the innerHtml of my element(s) to "5".
> However, zero seems to work differently. When I call html(0), it
> removes the contents of my element(s) and does not append anything. I
> had hoped after a call to html(0
8 matches
Mail list logo