Hello, is there a way to basically achieve a BlindLeft and BlindRight effect and if yes, how would I do that? Thank you in advance for your help. _________________________________________________________________ Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/
You should be able to do it by using the current Blind functions as a guide to make your own work left and right. On 10/18/05, Marco M. Jaeger <mmjaeger-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> Hello, > > is there a way to basically achieve a BlindLeft and BlindRight effect and if > yes, how would I do that? > > Thank you in advance for your help. > > _________________________________________________________________ > Don''t just search. Find. Check out the new MSN Search! > http://search.msn.click-url.com/go/onm00200636ave/direct/01/ > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs >
For example, throw this in effects.js Effect.BlindRight = function(element) { $(element).style.width = ''0px''; Element.makeClipping(element); Element.show(element); return new Effect.Scale(element, 100, Object.extend({ scaleContent: false, scaleY: false, scaleMode: ''contents'', scaleFrom: 0, afterFinish: function(effect) { Element.undoClipping(effect.element); } }, arguments[1] || {}) ); } BlindLeft will be more difficult. You''ll have to float the div right, and call a function similar to above...It''ll still clip the right-most content, though. -Mark Chadwick _______________________________________________ Rails-spinoffs mailing list Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Just as a small aside (and I realize this is just an example), but I''d recommend putting your own effects into a seperate js file (ie. myeffects.js) and included that along with effects.js. That way when you upgrade versions, you don''t have to reapply your changes to the new effects.js. On 10/18/05, Mark Chadwick <mark.chadwick-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> For example, throw this in effects.js > > Effect.BlindRight = function(element) { > $(element).style.width = ''0px''; > Element.makeClipping(element); > Element.show(element); > return new Effect.Scale(element, 100, > Object.extend({ scaleContent: false, > scaleY: false, > scaleMode: ''contents'', > scaleFrom: 0, > afterFinish: function(effect) { > Element.undoClipping(effect.element); > } > }, arguments[1] || {}) > ); > } > > BlindLeft will be more difficult. You''ll have to float the div right, and > call a function similar to above...It''ll still clip the right-most content, > though. > > -Mark Chadwick > > _______________________________________________ > Rails-spinoffs mailing list > Rails-spinoffs-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs > > >