Hi David!
> I want to pass the animate hash as an option so i don't need to go into
> the plugin to change the animation effects.
>
> $('#test').plugin({anihide: {opacity: 'hide'}, anishow: {opacity:
> 'show'}, anitime: 3000});
>
> $.fn.test = function(options){
> var anihide = options.anihide;
> var anishow = options.anishow;
> var anitime = options.anitime;
> $(img).siblings("img:visible").animate(anihide,
> anitime).end().animate(anishow, anitime);
> }
>
> The last line is from the actual plugin, the other code is pseudo code.
> But i think you can understand the point i'm trying to make.
> When i alert anihide the first time i get the opacity value but the
> second time i get true as value.
This is a known problem: http://jquery.com/dev/bugs/bug/237/
The workaround is to clone the hash before you pass it to animate, eg:
$().animate($.extend({}, hash), 5);
Klaus Hartl's tabs plugin has the same issue. If the above does not work, take
a peek at his code: http://stilbuero.de/jquery/tabs/
-- Jörn
--
GMX DSL-Flatrate 0,- Euro* - Überall, wo DSL verfügbar ist!
NEU: Jetzt bis zu 16.000 kBit/s! http://www.gmx.net/de/go/dsl
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/