Advertisement
Guest User

Untitled

a guest
Aug 1st, 2015
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. // Old
  2. $(function() {
  3. var flashCallback;
  4. flashCallback = function() {
  5. return $(".alert").fadeOut();
  6. };
  7. $(".flash-message").bind('click', (function(_this) {
  8. return function(ev) {
  9. return $(".alert").fadeOut();
  10. };
  11. })(this));
  12. return setTimeout(flashCallback, 2000);
  13. });
  14.  
  15.  
  16.  
  17. // New
  18. $(function() {
  19. var flashCallback;
  20.  
  21. flashCallback = function() {
  22. return $(".alert").fadeOut();
  23. };
  24.  
  25. $(".flash-message").on('click', flashCallback);
  26.  
  27. return setTimeout(flashCallback, 2000);
  28. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement