Tag Archives: twitter

A plugin so short it’s tweetable: Mask

I recently found the need to create a utility that helps me to mask a series of elements with a background image that spans across them, so the the picture basically gets masked by the elements selected. I couldn’t find a sweet reusable solution out there, so I went ahead and created my own little jQuery mask plugin. Here’s the code:

$.fn.mask = function(u) {
	return $(this).each(function() {
		var p = $(this).position();
		this.style.background = 'url('+u+') -'+p.left+'px -'+p.top+'px';
	});
};

Here’s how to use it:

// grab all li's on the page and mask them with a certain image
$('li').mask('http://farm3.static.flickr.com/2075/2509376094_737cce37d4_o.jpg');

Most interestingly, this was the first actually useful plugin that was tweetable in it’s entirety: http://twitter.com/pbakaus/statuses/2492305298. Enjoy!

The problem with Twitter

Twitter is wonderful, since it allows us to post all these tiny bits of information that can be expressed in less than 140 characters. Blog posts are usually considered if you have a lengthy topic to blog about, and you want to provide real value and detail. But what about everything inbetween? What happens with all the content and ideas that I want to share, but are too lenghty for Twitter, but too feel to short for a blog post?

It gets lost.

This blog post is a wonderful example. If I hadn’t realized the fact above, you’d never read about this – since it’s a short blog post, but too long for Twitter. The constraint that you’re setting on yourself is dangerous, and you can see it here on this blog. I love talking about what I do, and I talk to people everyday, but as a matter of fact, very few things end up here.

The key to remember is that what counts is always quality, not quantity. If you have something in your mind that you think provides real value, then please write about it. Yes, even if it’s just one character more than your tweet can hold.

See you soon with more short blog posts!