Unfortunately there is no simple "one liner" that will shuffle an array in javascript. All to often I see people advising to use:
sort(function() { Math.random() - 0.5 }))
However, this does not shuffle the array. First, let's take a look at what does work. It's called the Fisher-Yates shuffle and looks like this in javascript:
...Sometimes you just need a progress bar. While working on a HTML5 game last year we had the issue where we were making an ajax request for two very large files and then processing them both. Roughly the times were a minute for each file on a slow connection and then
...I had to implement a placeholder for a search box today and discovered, once again, that IE8 & IE9 do not have good support for it. What follows is not a drop in solution, but you should be able to apply the concepts to your particular solution. The first step is
...