Advertisement
shmaltorhbooks

Untitled

Jun 14th, 2012
31
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function show_blocks(el) {
  2.     [2,3,4,5,6,7,8,9,10].forEach(function(i){
  3.         $('#block'+i).hide();
  4.     });
  5.     var val = $(el).val();
  6.  
  7.     var blocks = {
  8.         3: 5,
  9.         4: 6,
  10.         5: 7,
  11.         6: 8,
  12.         7: 9,
  13.         30: 10
  14.     };
  15.     $('#block' + blocks[val]).show();
  16.     if (3 == val) {
  17.         $('#block2').show();
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement