Advertisement
Guest User

jquery

a guest
Aug 14th, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
jQuery 0.25 KB | None | 0 0
  1. $(document).ready(function() {
  2.     //your array of pokemon
  3.     var randNum = Math.floor(1+Math.random()*649);
  4.     $('img').attr('src', randNum + '.png');
  5.     $('audio').attr('src', randNum + '.mp3');
  6.     $('p').text("#" + randNum + " " + pokemon[randNum]);
  7. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement