Permalink
Browse files

Added 'read more' breaks in articles to shorten content on index page…

…. Tweaked content.
  • Loading branch information...
1 parent 0958255 commit cb2ce59a8de367159522702bc687bf24b6560c30 @colingourlay committed Feb 20, 2012
View
4 source/_posts/2011-12-01-moving-the-web-forward.markdown
@@ -8,10 +8,10 @@ categories:
There are a few developers out there such as [Christian Heilmann](http://christianheilmann.com) and [Paul Irish](http://paulirish.com) who are constantly making outstanding contributions to our community. What I love about these guys is that they make you feel like you too are capable of hacking together great things, and that someone else out there is grateful you didn't keep your little creations to yourself. They're helping evolve the web by developing tools and libraries that make our work a lot easier, creating richer experiences and showing us how we can harness web standards to bring these experiences to as many people as possible. Yesterday, a website launched to let us know that we're invited to the party too...
-<!-- more -->
-
[Move the Web Forward](http://movethewebforward.org/) is a new resource designed to help the rest of us give back to the web platform, and its surrounding ecosystem. It gathers together many excellent resources, describing how to contribute to the HTML/CSS specs, how to use and help refine the latest browser developments, and explains why you should be sharing your discoveries with everyone else.
+<!-- more -->
+
It's a short document (you can read the whole thing in under ten minutes), but it serves as a launchpad into a wealth of information you can spend hours/days poring over. I had a flick through it and couldn't help but feel a calling similar to [the one felt by Jake in the Blues Brothers](http://www.youtube.com/watch?feature=player_detailpage&v=P1KZKZs-2YM#t=111s). I just kept thinking _the blog_ ... _the Blog_ ... *_THE BLOG!_* It wasn't a religious experience (I'm a grown-up after all), but an inspiring one, nonetheless.
I'm not much of a writer, but I do like having a space to collect my thoughts and let them distill into ideas I can build things with - the only difference is that I'll now be doing it publicly. I'll probably use this space for sharing the problems I run into, and my attempts at solving them. If something in this blog could save you an afternoon of scratching your head, I'll have justified its existence.
View
16 source/_posts/2012-02-17-safely-using-ready-before-including-jquery.markdown
@@ -8,21 +8,21 @@ categories: JavaScript jQuery DOM
Earlier today, I read [Stop paying your jQuery tax](http://samsaffron.com/archive/2012/02/17/stop-paying-your-jquery-tax), an excellent article by [Sam Saffron](http://samsaffron.com/) which explains why it's a great idea to move all of your external JavaScripts to the bottom of the HTML document (just before the closing `body` tag). Near the end of the article, he proposes a method which allows you to continue to use jQuery's DOM ready method anywhere in your document, even though you've moved jQuery itself to the bottom. His method is essentially this:
-<!-- more -->
-
-* In the `head`, include a script that:
- 1. Defines an array
- 2. Creates a _fake_ `$` function that pushes its argument to the array
-* In the `body`, just after you include jQuery, include a script that:
- 1. Uses jQuery to loop over the array's contents
- 2. ...and calls the _real_ `$` function, passing in the argument.
+1. In the `head`, include a script that:
+ * Defines an array
+ * Creates a _fake_ `$` function that pushes its argument to the array
+2. In the `body`, just after you include jQuery, include a script that:
+ * Uses jQuery to loop over the array's contents
+ * ...and calls the _real_ `$` function, passing in the argument.
I decided to have a play around with the code examples Sam gave and I realised that it only caters for one of jQuery's possible ways of binding to DOM ready:
``` js
$(handler) // Where `handler` is the function to bind
```
+<!-- more -->
+
jQuery also allows the following:
``` js

0 comments on commit cb2ce59

Please sign in to comment.