Skip to content

Instantly share code, notes, and snippets.

View justintieu's full-sized avatar

Justin Tieu justintieu

View GitHub Profile
1 - Humans
This is Morgan. Hello. Morgan is a human. Last time I checked. As a human, Morgan has various ways of perceiving the world around her, like seeing, hearing, and feeling. Is anyone else seeing these? There area few more as well like smelling and tasting, but we won't deal with those as much. Thank goodness. But Morgan has more than senses. She also has memories, experiences, skills, knowledge. Thanks. In human computer interaction, we have to take into consideration every element of the human, from the way they perceive and interact with the world, to their long history of using computers and technology.
2 - Computers
This is a computer. Or at least, this is probably what you think of when you think of the term computer. But this is also a computer. And so is this. And so is this. And so is this. And so is this. Hey! This is Amanda, my video producer. Go on, I'm rolling. Right, and so is this. And so is this, and this, and this, and this, and even this. And so is this. And so is this. And so is thi
/**
* Check a href for an anchor. If exists, and in document, scroll to it.
* If href argument ommited, assumes context (this) is HTML Element,
* which will be the case when invoked by jQuery after an event
*/
function scroll_if_anchor(href) {
href = typeof(href) == "string" ? href : $(this).attr("href");
// You could easily calculate this dynamically if you prefer
var fromTop = 50;