[jQuery] Re: how to do '++' in jQuery

2009-01-21 Thread David .Wu
yup, it's cool, but how about scrollLeft()++? On 1月21日, 下午9時22分, Liam Potter wrote: > This I didn't know, could be useful. > > Balazs Endresz wrote: > > Moreover, as of 1.3 this works like .css, so there's no animation at > > all: > > $("xx").animate({ width: "+=10px" }, 0); > > > (In 1.2 if you

[jQuery] Re: how to do '++' in jQuery

2009-01-21 Thread Liam Potter
This I didn't know, could be useful. Balazs Endresz wrote: Moreover, as of 1.3 this works like .css, so there's no animation at all: $("xx").animate({ width: "+=10px" }, 0); (In 1.2 if you set the duration to 0 then the default value is used.) On Jan 21, 1:00 pm, Liam Potter wrote: like

[jQuery] Re: how to do '++' in jQuery

2009-01-21 Thread Balazs Endresz
Moreover, as of 1.3 this works like .css, so there's no animation at all: $("xx").animate({ width: "+=10px" }, 0); (In 1.2 if you set the duration to 0 then the default value is used.) On Jan 21, 1:00 pm, Liam Potter wrote: > like this > $("xx").animate({ width: "+=10px" },1000); > > this will

[jQuery] Re: how to do '++' in jQuery

2009-01-21 Thread Liam Potter
like this $("xx").animate({ width: "+=10px" },1000); this will add 10 pixels to the width, in a second. Kean wrote: Probably there's a better way. Doesn't look elegant. $('xx').width($('xx').width()++) ; On Jan 21, 2:05 am, "David .Wu" wrote: some times we want to do some animation we

[jQuery] Re: how to do '++' in jQuery

2009-01-21 Thread Kean
Probably there's a better way. Doesn't look elegant. $('xx').width($('xx').width()++) ; On Jan 21, 2:05 am, "David .Wu" wrote: > some times we want to do some animation we use xxx.width++ > in jQuery we give value like this $('xx').width(value) > > how to do ++ thing in this way?