[jQuery] Re: Can someone explain this string behavior?

2007-08-23 Thread Pops
> One good way to write your function would be: > > function gotoNextPageMikesWay() > { >var start = $("start"); >start.value = +start.value + ( +$("rows").value ); > } > > The unary + converts each value to a number. You'll see this fairly often; Hi Michael, The issue is solved and

[jQuery] Re: Can someone explain this string behavior?

2007-08-23 Thread Michael Geary
> From: Pops > > I think I have a "theory" about why this is happen and it > might not be jQuery related but just Javascript, but maybe > someone can explain this because it is so odd. > > This is the code: > > logln("wcError "+IsHidden('wcError')?"hidden":"not hidden"); > > logln() is a f

[jQuery] Re: Can someone explain this string behavior?

2007-08-23 Thread Pops
> No, I can't tell. A quick test on the Firebug console gave expected results: > > >>> var x = 1 > >>> x += 1 * '4' > 5 Change x to an alphanumeric: var x = '1';

[jQuery] Re: Can someone explain this string behavior?

2007-08-23 Thread Klaus Hartl
Pops wrote: On Aug 23, 9:36 am, Klaus Hartl <[EMAIL PROTECTED]> wrote: That is a matter of operator precedence. The plus operator has higher precedence than the conditional operator, thus "wcError "+IsHidden('wcError') gets evaluated first, afterwards the ?: Ahh! That didn't hit me

[jQuery] Re: Can someone explain this string behavior?

2007-08-23 Thread Pops
On Aug 23, 9:36 am, Klaus Hartl <[EMAIL PROTECTED]> wrote: > That is a matter of operator precedence. The plus operator has higher > precedence than the conditional operator, thus > > "wcError "+IsHidden('wcError') > > gets evaluated first, afterwards the ?: > Ahh! That didn't hit me. W

[jQuery] Re: Can someone explain this string behavior?

2007-08-23 Thread Klaus Hartl
Pops wrote: > I think I have a "theory" about why this is happen and it might not be > jQuery related but just Javascript, but maybe someone can explain this > because it is so odd. > > This is the code: > > logln("wcError "+IsHidden('wcError')?"hidden":"not hidden"); > > logln() is a functio