+ Windows: n. - The most successful computer virus, ever. +
+ A computer without a Microsoft operating system is like a dog
without bricks tied to its head +
+ A Microsoft Certified Systems Engineer is to computing what a
McDonalds Certified Food Specialist is to fine cuisine +
How would I go about making the second click change the elements width
back from 500px to 10px? So essentially you click once to expand it
and click again to return it to it's original state and then you can
click again to expand it...and so on.
Hi guys, Very simple newbie question for someone. In the YUI Library there's an example provided for the Easing animation which changes the elements width from...
hi Dav, Thanks for sharing you're example. You can achieve this effect with a single animation instance by changing the "attributes" property. This will...
Matt -- Good call, I hadn't thought of that 8-) Thanks for the heads up.. Dav Glass dav.glass@... davglass.com 618.694.3476 + Windows: n. - The most...
Matt-- I updated my example to reflect your advise.. Thanks again.. http://blog.davglass.com/files/yui/animagain/ Dav Glass dav.glass@... davglass.com ...
Or you could use the YAHOO.ext (Yahoo! UI extensions) library and it could be this code: var test1 = YAHOO.ext.Element.get('test1'); test1.addListener('click',...
Hi Jack, That looks good, but doesn't accomplish Dav's task, which changes other attributes beyond width. The task you demonstrate can be easily accomplished...
Sorry, I didn't see Dave's example. For Dave's task it's almost identical: var test1 = getEl('test1'); test1.on('click', function(){ test1.getWidth >= 300 ? ...
I'm sure your stuff works as advertised, but the message here is that it is a simple process to modify an Anim's attributes (and other properties) at runtime...
... I agree 100%. But when I look at this: var test1 = new YAHOO.util.Anim('test1', { width: { to: 150 }, height: { to: 150 }, top: { to: 150 }, left: { to:...
Hey Jack, ... Ahh yes, good point. I forgot to unsubscribe the callback. Should do something more like: var test1 = new YAHOO.util.Anim('test1', { width: {...
Hi, All you need to do is keep track of whether it is exanded, and adjust the target width accordingly. This can be done when the animation completes by...
Hi Matt and Dav, Thanks very much for helping me out. Matt, In your example, is there a way of refining the click function to a single element (eg. a link with...
The listener is being added to the "page" or document. If you want to add it to the link called demolink, then the code would look like this: YAHOO.util.Event....