Light side of the Force

Wait for multiple #XHR with #JavaScript #Semaphore

If you are playing with XHR, sometimes you need to wait for many small requests. Sure, you can have separate callback for each request, but sometimes you need to wait until you load full dataset. Of course you can use modern ways like promise, but there aren’t supported everywhere.

Get a #Bootstrap device by #JavaScript

When you are creating responsive site, sometimes you need to separate non-touch and touch handlers. Sure, you can have both handlers at same time or detect mobile devices by JavaScript directly. But it will be cool to detect only Bootstrap device if you are using Bootstrap. It eliminates the problem when your JavaScript and Bootstrap detects different devices.