Posted By

rodreegez on 03/22/08


Tagged

check state Scriptaculous combojs


Versions (?)

script.aculo.us check state by 24ways


 / Published in: JavaScript
 

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

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

  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. }

Report this snippet  

You need to login to post a comment.