jQuery is pretty much the gold standard for Javascript goodness, at least in my opinion. I use it for everything, and you should too. Jaml has only been around since October but it’s already pretty damn awesome. Combining these two powers like peanut butter and jelly results in awesome. Jaml Jaml is a templating engine for Javascript based loosely on Haml. It lets you write code like this: So you can call this: Jaml.render('simple'); To output...
Verbose Logging
software development with some really amazing hairHijack AJAX requests like a terrorist
AJAX requests are a grand thing. They let you request things from your server without refreshing the page. Now, if you are trying to proxy a page, you can rewrite all the links in the page to point back through your proxy, but AJAX requests are another thing. Oh wait no they’re not! You can’t rewrite them when you proxy the page (by proxy, I mean you request my page with a URL param to another page, and I pull in that page, do some stuff, and ...
Read the full article
Making nth-child work everywhere
The nth-child pseudo selector is a nice feature in CSS3. Well, most of the things in CSS3 are pretty sweet. Chris Wanstrath has a good post on the nth-child selector, and I’d suggest reading it for a bit more in depth on what the nth-child selector actually does, as I just cover getting the same effect in all browsers. Unfortunately, while Internet Explorer does support some of the CSS3 stuff, it doesn’t support a bunch of them either. (Discla...
Read the full article
Hacking markItUp! to help me embed videos
I use swfobject to embed videos because, as I explained back here, just blindly copying the embed code doesn’t work that well half the time, and videos end up being different sizes, etc. I was getting kind of fed up with having to go back and remember how to do it every time though. The format is pretty straightforward, but I don’t embed videos often enough to actually remember the exact syntax, so I found myself going back to posts with video...
Read the full article
swfobject, meet jQuery
I was getting sick and tired of just blindly copying and pasting embed code for videos and every other flash thing I post. Naturally, being a programmer I had to do something about it. Enter jQuery and swfobject Check this out: Some embed tags that are provided are only of one type: either object or embed. This is no good since that means some browsers are excluded and it won’t work. Lame! Swfobject solves the problem by using JavaScript to in...
Read the full article
Simple jQuery timeout
I needed jQuery to fadeout an item after a certain timeout, and I found it odd that I couldn’t find a native jQuery way to do it. Whatever. jQuery is so awesome that it doesn’t matter, because here’s what I came up with. EDIT 28-Nov-2009 In retrospect, all I wanted was a jQuery like syntax, but leveraging jQuery to do the timeout is sort of wrong. After all, Javascript does have a setTimeout function. I must have been in a jQuery must do all o...
Read the full article
Wordpress Multipart Posts, Inlined with jQuery: Part 2
(See Part 1) And we’re back! So, just take a look up below the title…see that little link? Yeah go ahead and click that. If I did my job right (tested in Safari on Windows, Chrome, FF), the contents for Part 1 should slide in above this post. In this post, since I use the Textile 2 plugin, I add this snippet at the top: (See "(remote-inline)Part 1":/2009/07/08/wordpress-multipart-posts-inlined-with-jquery-part-1) In textile land, that translat...
Read the full article
Wordpress Multipart Posts, Inlined with jQuery: Part 1
This is the first of a multipart post. I’ll be the first to admit, after you read this, and part 2, ignoring the context and concentrating on the actually content, you’d wonder why, but it makes sense when it’s all together. So I’ve seen many multipart posts out there, do this today, tomorrow do this, and every time, in order to view them all together, you, um, can’t. You have to have multiple tabs open and read one, then read the next, flippi...
Read the full article