Custom AddThis share button

I wanted to have an AddThis share but­ton that would fit bet­ter with the site’s design, and if you’re read­ing this post on its own page you can scroll down and see what I mean. While AddThis pro­vides plenty of ways to cus­tomize their but­tons, there is no way to assign your own image to the icon, which means doing it the hard way… well, rel­a­tively speak­ing of course.

There are three main steps to cre­at­ing a cus­tomized share but­ton. There’s some javascript to include in the footer.php, few lines of html to add at the end of your posts, and of course some styles and the icon itself.
Keep Reading

Leave a comment

Simple jQuery placeholder script for input fields

Placeholder is a very use­ful attribute of the <input> tag that is spec­i­fied in the HTML5 spec. It pro­vides a text that goes into the field, by default, and is used as a kind of a quick tip for the user about what they should type into the field, such as “type to search”, or “type in user­name”. The nice thing about “place­holder”, as oppose to, for exam­ple, sim­ply set­ting some value for the field, is that it auto­mat­i­cally dis­ap­pears when the user starts typ­ing some­thing in, but it reap­pears if the user ends up leav­ing the field empty. Unfortunately this attribute, and its func­tion­al­ity, is actu­ally not sup­ported by most browsers, includ­ing Firefox 3.6 and IE8, it is how­ever sup­ported by Chrome 4, and pos­si­bly Safari 4 though I can’t vouch for the latter.

I recently had a few projects that needed this func­tion­al­ity, and while some of them had email, pass­word and other fields that required val­i­da­tion, one needed just very sim­ple text fields with place­holder text. So I wrote this very sim­ple javascript func­tion, using jQuery, to do just that (I’m using jQuery 1.4.2 here). Keep Reading

Comments 3

HTML5 Video and Audio Experiment

Gizmodo had a post on an HTML5 exper­i­men­tal page from 9Elements design stu­dio. If you have Firefox 3.5, Safari 4 or lat­est Chrome build you can check it out your­self here.

It’s really an amaz­ing piece of work — beau­ti­ful ani­ma­tions cou­pled with sound and neat inter­ac­tiv­ity (click­ing the lights dis­plays tweets about the page). All this is done with no Flash, or Silverlight or any­thing like that, though of course the code that runs all that isn’t exactly triv­ial, it’s all HTML5, JavaScript and Canvas.

I hope that we see more and more peo­ple tak­ing advan­tage of HTML5. Internet Explorer cur­rently sup­ports only a small sub­set of HTML5 spec and none of it is for some­thing like this. But if there’s enough push for HTML5, hope­fully either the other browsers will leave IE com­pletely in the dust and peo­ple will just stop using it (one can always dream), or Microsoft will wiseup and imple­ment proper stan­dards and HTML5 sup­port into IE.

[Gizmodo Post]

Leave a comment

Weekend Highlights — Google Wave, HTC Hero, King’s Quest and Screengrab!

So this has been a pretty busy week. Of course the biggest news is me launch­ing this site… <crick­ets>… or maybe not. I guess it all depends on your per­spec­tive. As for the other inter­est­ing stuff — Google is send­ing out 100,000 beta invites to Google Wave in September; HTC Hero has been reviewed by every­one except me; Steam is hav­ing a sale on King’s Quest and Space Quests col­lec­tions, and you know I got it as soon as I saw it; and finally a small Firefox add-on that is going to change my life (not really, but it’s an atten­tion grab­ber, ain’t it). Keep Reading

Leave a comment