do

Virat, Anushka donate Rs 5L each

Virat, Anushka donate Rs 5L each




do

Maradona autographs shirt to help poor

Maradona autographs shirt to help poor




do

NGO charts unique way to induce people into donating

NGO charts unique way to induce people into donating




do

Centre’s advisory to NE states on returnees during lockdown

Centre’s advisory to NE states on returnees during lockdown




do

Using Showdown/PageDown with and without jQuery

Showdown (also known as PageDown) is a JavaScript parser for Markdown-formatted text. It’s used on this site to generate a formatted preview of your comment as you type it. Showdown is library-agnostic, but fortunately, using it with jQuery isn’t much of a problem.




do

The HTML5 `document.head` DOM tree accessor

One of the lesser known HTML5 JavaScript goodies is the document.head DOM tree accessor, which is a more efficient (and easier to type) alternative to document.getElementsByTagName('head')[0]. Native support for document.head is very easy to detect…




do

Using `setTimeout` to speed up `window.onload`

A few days ago, Martín Borthiry contacted me with a question. He had been using the optimized asynchronous Google Analytics snippet for a while, and noticed an additional speed gain when wrapping it inside a setTimeout() with a delay of 0 milliseconds. His tests made it pretty clear that this technique was indeed slightly faster, but Martín had no clue why.




do

Using the `oninput` event handler with `onkeyup`/`onkeydown` as its fallback

HTML5 standardizes the oninput event handler, which should be used to detect user input in JavaScript. Sure, you could use onkeydown or onkeyup instead, but those were never really designed for this particular use case, and it shows.




do

The smallest possible valid (X)HTML documents

I thought it would be fun to document the smallest possible valid HTML documents for each version, so here goes :)




do

Hiding JSON-formatted data in the DOM with CSP enabled

If Content Security Policy is enabled for protection against cross-site scripting attacks (i.e. the unsafe-inline option is not set), the use of inline