Panasonic Youth rob sanheim writes about software, business, ruby, music, stuff and things



Posted
26 October 2005 @ 10pm

Tagged
Ajax, Javascript, Less Code, Rails

Discuss

moo.fx - lightweight javascript effects built on Prototype

Is scriptaculous overkill for the quick web app you are writing? Then check out moo.fx, a 3kb (!) file that extends Prototype to do some very smooth, effective transitions. Moo.fx handles height, width, and opacity, and does it with some very simple code:

JAVASCRIPT:
  1. window.onload = function(){
  2.  var effect = new fx.Height('myelement',{duration:400,
  3.   onComplete: function(){
  4.    alert('the effect is finished');
  5.   }
  6.  });
  7. }

The above snippet registers the height effect on 'myelement' onload - then you're free to call the toggle method or a custom method on whatever events you want. Take a look at the demo page to see this stuff in action.

(Via why the luck the stiff)


No Comments Yet


There are no comments yet. You could be the first!

Leave a Comment

updated “Effective Ajax” presentation online Bookmarks and the back button with Ajax at onjava.com