Posted By

bionickid on 02/08/10


Tagged

jquery stack stapelverwaltung


Versions (?)

jquery Stack


 / Published in: jQuery
 

  1. //Stack erstellen
  2. var stack = { delay: 1000, actions:[],
  3. run: function() {
  4. if (stack.actions.length) {
  5. stack.actions.shift()();
  6. setTimeout(stack.run, stack.delay);
  7. }
  8. }
  9. };
  10.  
  11.  
  12. //Stack mit each() bef�¼llen:
  13. $("#content div").each(function(){
  14. var ele = this;
  15. stack.actions.push( function(){
  16. $(ele).fadeIn(2000); }
  17. );
  18. });
  19.  
  20. //Stack einzel bef�¼llen
  21. stack.actions.push( function(){
  22. alert("stack ende");
  23. );
  24.  
  25. //Starten
  26. stack.run();

Report this snippet  

You need to login to post a comment.