Verbose Logging

software development with some really amazing hair

T + G I F R

Articles tagged with "jquery"

IE7 Eats Babies

· Posted in Software
But you already knew that, right? These days, in fancy AJAX applications, you frequently want a link on a page to just do asynchronous things. You don't actually want the link to go anywhere. Let's just ignore the fact that this goes against progressive enhancement okay? Can I see your ID please? So sometimes the link is important enough, and you throw an id on it and you can do this in jQuery. $('#important-link").click(function() { alert('trol…

The What, Why, and How Of Kindlebility

· Posted in Programming
Kindlebility is now Tinderizer TL;DR Kindlebility sends articles on the web to your Kindle. It needs your Kindle email address (@free.kindle.com addresses are fine). I don’t store your Kindle address or use it for anything else. Use Kindlebility to make a bookmarklet. Add kindle@darkhelmetlive.com to your Kindle Approved Email List. Click the bookmarklet on a page to send the article to your Kindle. Moving on I’ve been meaning to write some more…

A Better jQuery Script For Embedly

· Posted in Programming
Embedly is a great service for generic embedding of content. Have you seen posterous? How they can just accept any link to a video on youtube, a picture on flickr, whatever, and it gets properly embedded? I imagine they could use Embedly to accomplish that. Anyway. They have a jQuery script to do embedding, but in the middle of if is this behemoth of a code smell: Oh noes a global variable! The implication of this is that you can only run one ca…

Make Your Own Badge With jQuery And Jaml

· Posted in Programming
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 t…

Hijack AJAX Requests Like A Terrorist

· Posted in Programming
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 se…

Making nth-child Work Everywhere

· Posted in Programming
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.aspx) either. (Di…

Tweet Link Rollover

· Posted in Meta
I don’t like visiting sites for something really simple. Reading a single tweet is one of them. If I link to a tweet, you shouldn’t have to go to Twitter to view it. It’s just 140 characters. So what did I do? I added some codes to my blog to pull those tweets in. If I link to a tweet, I can go off to Twitter, pull in the tweet and set the ‘title’ attribute on the anchor tag so when you hover over the link, it shows the tweet text. Yay! From thi…

Hacking MarkItUp! To Help Me Embed Videos

· Posted in Programming
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 videos …

swfobject, Meet jQuery

· Posted in Software
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 inse…

Simple jQuery Timeout

· Posted in Programming
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 of …

Wordpress Multipart Posts, Inlined With jQuery: Part 2

· Posted in Programming
(See (remote-inline)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,…

Wordpress Multipart Posts, Inlined With jQuery: Part 1

· Posted in Programming
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, flipping…