script.aculo.us check state by 24ways


/ Published in: JavaScript
Save to your folder(s)

handy little script from a great little tutorial to help get you started with script.aculo.us.


Copy this code and paste it in your HTML
  1. Effect.OpenUp = function(element) {
  2. element = $(element);
  3. new Effect.BlindDown(element, arguments[1] || {});
  4. }
  5.  
  6. Effect.CloseDown = function(element) {
  7. element = $(element);
  8. new Effect.BlindUp(element, arguments[1] || {});
  9. }
  10.  
  11. Effect.Combo = function(element) {
  12. element = $(element);
  13. if(element.style.display == ‘none’) {
  14. new Effect.OpenUp(element, arguments[1] || {});
  15. }else {
  16. new Effect.CloseDown(element, arguments[1] || {});
  17. }
  18. }

URL: http://24ways.org/2005/introduction-to-scriptaculous-effects

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.