On Aug 23, 1:46 pm, "Ganeshji Marwaha" <[EMAIL PROTECTED]> wrote:

> @Pops - Good catch... Thanks... Fixed it...

No sweat Ganeshji!

I like it. I'm going extend it, both as a learning thing and to
contribute in this fun "Open Source" process - which is 100% new to
me. You see, I am one of those greedy commercial "Invented Here Only"
types who was living in the past.  This Open Source mentality is,
shall I say it, "Surreal!"  <g>

So I help I can give back too. :-)

I got some more information that might help.

Keep in mind I am still probably in 2nd or 3rd grade by now with my
jQuery 2 week+ experience. :-)

When you mentioned "optional"  in relatiionship to the
jquery.easing.js plugin.  I took you for your word and didn't use it
to see 1) what is the minimum requirement for jquery.lavalamp.js and
2) whats the difference when jquery.easing.js is used and not used.

So the first thing I did was comment out the jquery.easing.min.js
<script> line and reloaded.  Firebug was spitting out errors glalore
as I hovered over the menu items.

After trial and error,  I noticed fx: "linear" was the mininum
requirement, anything else, you got errors, so I figured,

    "Ok, first improvement, add jquery.easing detection support to
jquery.lavalamp.js"

So to test the theory, before I edited your code, I added this to the
startup logic:

     if (!jQuery.easing) alert("easing plugin not loaded");

Tried it out and it didn't work (no alert).  I checked DOM and I see
that easing was part of jQuery.

Hmmm, I thought.  "Maybe I need to close all my FireFox windows and
start refresh"

I tried that, reloaded and check DOM again to make sure there was
nothing there.   But there it was!  easing was still part of jQuery
construct.  I then checked the jQuery source code and behold, there it
was!  <g>

I didn't know that jQuery always had a easing property and supported
"linear" and "swing."

So for MORONS like myself who are discovering all this for the first
time, you already did a fantastic job with the itemized instructions,
I think you might to add alittle more clarification to help the next
poor jQuery newbie. :-)

1) Add a jquery.easing plugin detect. I guess checking for other
easing functions that is not part of the default:

pseudo code:

     if (fx is noit in [linear, swing] and null ==
jQuery.easing.backout )  {
           restore defaults.or  maybe popup error "incorrect fx"
     }

2) Maybe this text will be useful:

Lavalamp uses the existing jQuery.easing property and this provides
two values for fx:

     fx: "linear"     <--- default
     fx: "swing"

If you wish to add other easing effects such as fx: "backout" as we
used in the illustrated startup logic,  then you need to add the
jq.easing.js plugin to your setup.  The Easing plugin will provide the
following fx effects you can use with LavaLamp:

  fx: "backin"
  fx: "backout"
  fx: "backinout"
  fx: "bouncein"
  fx: "bounceout"
  fx: "bounceinout"
  fx: "easein"
  fx: "easeinout"
  fx: "easeout"
  fx: "elasin"
  fx: "elasout"
  fx: "elasinout"
  fx: "expoin"
  fx: "expoout"
  fx: "expoinout"
  fx: "linear"

Hope this helps

--
HLS

Reply via email to