Advertisement
Guest User

Untitled

a guest
Feb 8th, 2016
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. $(document).ready(function () {
  2.  
  3. var colorBlocks = [
  4. 'yellow',
  5. 'green',
  6. 'blue',
  7. 'white',
  8. 'orange'
  9. ]
  10.  
  11. $.each(colorBlocks, function (i) {
  12. $('#' + this).css("background", this);
  13. // When you use the alert you can see the boxes change color one by one
  14. // alert(something);
  15. });
  16.  
  17. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement