Quantcast
Channel: Senko's Blog » Javascript
Browsing latest articles
Browse All 3 View Live

Currying in Javascript

Javascript has somewhat strange scoping rules that can catch you unaware. Here’s a typical example: function test() { for (var i = 0; i < 5; i++) { setTimeout(function() { console.log(i); }, 1000);...

View Article



DOM text search/replace with jQuery

I recently did a quick hack to modify a bunch of text (phrases) on an already rendered HTML page. It was inconvenient to manually select single elements and modify the text – what I needed was a global...

View Article

HTML input placeholder handling with jQuery

There’s a million of small jQuery snippets which handle input placeholders (ie. the help/explanation text that’s shown until you actually write something in the field), and when HTML5 gets widespread,...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images