[jQuery] New plugin draft: animateClass

[jQuery] New plugin draft: animateClass

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY
style="WORD-WRAP: break-word; khtml-nbsp-mode: space; khtml-line-break: after-white-space">
<DIV><SPAN class=765384615-07112006><FONT face=Arial color=#0000ff size=2>Just
so you know Paul, the "Go Back" button doesn't work in
IE6/PC.</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<P><FONT size=2><!----------------//------<BR>andy matthews<BR>web
developer<BR>certified advanced coldfusion programmer<BR>ICGLink,
Inc.<BR>andy@icglink.com<BR>615.370.1530
x737<BR>--------------//---------></FONT> </P>
<BLOCKQUOTE>
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> discuss-bounces@jquery.com
[mailto:discuss-bounces@jquery.com]<B>On Behalf Of </B>Karl
Swedberg<BR><B>Sent:</B> Tuesday, November 07, 2006 9:39 AM<BR><B>To:</B>
jQuery Discussion.<BR><B>Subject:</B> Re: [jQuery] New plugin draft:
animateClass<BR><BR></FONT></DIV>
<DIV>
<DIV>On Nov 7, 2006, at 7:35 AM, Paul Bakaus wrote:</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">Hi guys,<BR><BR>as Rey proposed, I went on and
created a first version of animateClass.<BR>With animateClass, you can
animate an element from one class to a new one. Let me provide you an
example:<BR><BR>You have a form input with class "default". This class is
defined in an external stylesheet. <BR>Now on validation error you want the
class to change to "error", also as defined in your stylesheet.<BR>And you
want it nicely animated.<BR><BR>Just go ahead and do:
$("#myinput").animateClass("error", "default", duration); <BR><BR>For
examples and the script, check out <A
href="http://paul.jquery.com/plugins/animateClass/">http://paul.jquery.com/plugins/animateClass/</A><BR><BR>Remember,
this is a draft. It is nowhere nearly beta, because of the following issues:
<BR><BR>1.) The performance is poor when dealing with borders and margins
(don't know why?)<BR>2.) Animating block elements with auto width is not
possible<BR>3.) It works in IE (7 at least), but somehow in the second
example the border is not animated (This is probably because IE does not
have default values for the border when it's not set.). You can override
this by setting the border in the stylesheet at div.ex2-2 to border:
0px;<BR>4) Animating colors is not yet implemented.<BR>5) It's not yet a
demo project because of the lack of documentation and tutorial.<BR><BR>I
welcome any ideas of improvement!<BR></BLOCKQUOTE><BR></DIV>
<DIV>This is very slick! Great work so far, Paul.</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>One tiny suggestion for the demo: rather than baking in the onclick
handlers into the buttons, you could do toggle() inside document ready for
each of them and have the class animate back to the original one on the second
click, then back and forth, back and forth -- providing hours of amusement for
people like me. :)</DIV>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>Karl<BR class=Apple-interchange-newline>
<DIV><BR class=khtml-block-placeholder></DIV>
<DIV>___________________</DIV>
<DIV>Karl Swedberg</DIV>
<DIV>www.englishrules.com</DIV>www.learningjquery.com</DIV>
<DIV><BR class=khtml-block-placeholder></DIV><BR></BLOCKQUOTE></BODY></HTML>
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/





























































    • Topic Participants

    • andy