Hey again,

Rey: I'm absolutely with you with the idea of pushing jQuery with tutorials and examples. I myself love jQuery and I am starting to use in in commercial projects, too, but many of my co-workers are very interested in examples.

Of course, checking out demos of plugins is always a great idea. But I would also welcome more migration sheets of different frameworks like the one that was posted in jQuery's blog recently.

By the way, I perfectly know well that jQuery's build-in animation method should not be replaced, this is were some people may get a wrong idea in my first email in this thread.

I just wanted to have this extended functionality for myself, so as you said Rey, I will go ahead and create a demo / tutorial like plugin and post it again. This plugin will feature the method like described my Christof, because it's very interesting:

When doing $("#mydiv").animateClass(
'myFirstClass', 'mySecondClass'), the object is transparently cloned at opacity 0.0001 or visibility hidden with the given new class, then the style of this clone is computed, then a diff is made between the old computed style properties and the new ones, and finally our beloved animate() function takes care of the animation, then sets the class with className and removes the animated styles again (because we don't need them anymore if the class is set on the original). harhar :)


2006/11/6, Christof Donat <[EMAIL PROTECTED]>:
Hi,

> but now my own killer feature :D
>
> 3.) $("#mydiv").animateClass(oldClass, newClass); -or-
> $("#mydiv").animateClass(newClass);

That would be nice, but what about this:

.myFirstClass {
        display:inline;
        background-color:#000000;
}
.mySecondClass {
        display:block;
        background-color:#ffffff;
}

$("#mydiv").animateClass('myFirstClass', 'mySecondClass');

What will hapen?

Another thing: after the animation has finished, will the element only have
the style of the new class or will it be of the new class. Will it still be
of the old class? When does that change if it does?

Christof

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/



--
Paul Bakaus
Web Developer
------------------------
Hildastr. 35
79102 Freiburg
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to