Guest User

Untitled

a guest
Feb 25th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. <div class="item no-active">One</div>
  2. <div class="item">Two</div>
  3. <div class="item">Three</div>
  4. <div class="item">Four</div>
  5.  
  6. var random = Math.floor(Math.random() * $('.item').length);
  7. $('.item.no-active').hide().eq(random).show();
Add Comment
Please, Sign In to add comment