ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

« Previous 1 2 Next »
13
Date Submitted Mon. Oct. 2nd, 2006 1:05 PM
Revision 1
Beginner drench
Tags Array | JavaScript | List | Random | shuffle
Comments 3 comments
It works with Array types. The example is a simple list of numbers, but the array could contain anything; lists of strings, functions, DOM nodes, whatever. Unfortunately, a lot of things that seem like arrays in the DOM aren't really, so you can't shuffle the images on a page with just document.images.shuffle() all by itself.
4
Date Submitted Fri. Jul. 20th, 2007 7:34 PM
Revision 1
Scripter ColdKeyboard
Tags Array | debug | Show
Comments 0 comments
Very useful function that you can use to debug/show your array and it's contents.

Sometimes when you have problems with arrays and print_r() isn't very nice way to show array values because it shows everything in one line and then it is very hard to debug... this way I think it's much much easier.
« Previous 1 2 Next »