JavaScript

Tiny Javascript Cookie Library

This is one of those "why bother with an external library" moments. Mostly copied from MDN.

Button to Scroll to Top of the Page

Mobile websites all seem to have this button, which appears when you've scrolled down a bit. The button scrolls you back to the top of the page, where most of the menus reside.

Using strings to create functions

One of the less-used features is the Function() object, which can turn a string of Javascript code into a function. This is an example of how it can be useful.

Bookmarklet to Mass-Unfollow Twitter Users

I almost wrote a page for this, but it turns out a bookmarklet is good enough:

javascript:$('.js-follow-btn').click();undefined;

Learning Javascript via the Read Eval Print Loop (REPL)

All the tutorials out there teach JS by having the user write a file, and load it into the browser.

Javascript APIs and Libraries Change the Game

I was thinking a bit about the JS co-learning thing, and discovered that services, APIs and libraries really change the game, or have changed the game.

Horizontal Javascript Class

Sketching out a possible class for learning Javascript / learning to learn Javascript / learning to teach Javascript.

Prelims:
HTML and DOM
CSS and DOM

JS localStorage Demo

The attached file is a rudimentary demonstration of persistent local storage in the browser. You can click on it to see the page in action, and do a view source on that page.

Photo Wall that Scrolls Forever Loading New Photos at Bottom

I was reading the code at iworkfortheinternet.org and learned how to do this "scrolling forever wall" effect. It's clever.

What is HTML 5?

HTML 5 is a marketing term (kind of like "cloud computing") that has a somewhat imprecise technical meaning, but was created so that products and people could easily sum up their compatibility or know

Hashcash Anti-Spam

A ten second calculation to deter comment spam. It's an old technique called "hash cash" and has nothing to do with drugs.

Comparison Shopping for Toilet Paper, in multiple computer languages.

It's hard to concentrate when you're tired and cranky, so I wasted some time writing a simple calculator in several different languages.

Making the Tumblr "Well" Layouts with CSS

So I was puzzling over how to make the "Well" style layout in Tumblr without Javascript.

Javascript Delayed Hiding of an Element, Delayed Function Calls in Different Contexts

So I'm working on a small "speech bubble" library, and needed to delay hiding of the bubble. It's not that it was required, but it was a pain in the butt figuring out how to arrange the event handlers on the different elements so that you don't end up with a situation where you get a flickering bubble because you hide the bubble, and that fires a mouseover event that, in turn, displays the bubble again. That fires a mouseout event that causes the bubble to be hidden.

Learning the Facebook API

For the past few months I've been working on web apps. The first was a mobile site based on jQuery Mobile. While it was "cool", it quickly dawned on me that it wouldn't get any significant usership. For one, it was like a clone of 4square and Scvngr - and who really uses that? I'd peer into the lists of checkins, and it wasn't looking too encouraging. People use it when they're bored and alone, and my scenario didn't involve either of those situations.

Syndicate content