Hey you!

Postcards are cool! Go send some ->

postme.me

jQuery imageless buttons a la Google

Feb 17 2009 Tags:

THE BUTTONS NOW WORK! Please go to jQuery imageless buttons a la Google take two.

NEXT DAY EDIT: I have been shown the error of my ways and in just how many browsers I never considered the buttons don’t work. I will fix this and do another announcement. Until then please move along, there is nothing to see here, but I’m leaving the whole shebang up for the world to see to remind me never again to be as cocky without making sure. Thanks guys, you’ve been a wonderful crowd.

For the record, the buttons used to work in firefox 3, but then it updated to 3.0.6 and they stopped working for some reason.

Last week the whole internet was abuzz with Google’s reinvention of the button. They’ve issued numerous press releases about it, or at least it was people who have worked on the project and talked about it on their blogs, whatever really. The buttons we see today on gmail and other google services are, from what I can tell, version 3.1 and are the result of “endless cycles of code revision and quality control” by a whole team of very talented engineers.

Well, dear Google engineers, I’ve got you beat. I’ve managed to recreate their results in roughly six hours over two days and although I haven’t tested all of this in Internet Explorer yet I have good faith that it works there as well as everywhere else (I’m basing this on the fact that lately my stuff works 95% on IE out of the box, practice I say).

Over these few hours I’ve created a simple to use jQuery plugin and am releasing it under GPL and MIT license so anyone can benefit from what I’ve come up with in a very simple way. In fact, all it takes is calling a function on an element, any element, and it the plugin injects a bunch of html and css into said element to turn it into a button. Furthermore, I’ve made it so that buttons can behave as dropdown menus of sorts, select elements or checkbox elements. They mimic these elements to such an extent their values submit together with forms and even an onchange event is fired when the value changes.

I’m afraid my blog won’t let me inject css styling and such so here’s a screenshot of what it looks like:

To see a live demo and download the code go to thejQuery imageless buttons page.

The hubris

I have been informed by many people that I am an idiot. And they’re right! What was I thinking putting trust in IE7 and not testing it there even once? My excuse is that I was far too excited about the whole thing, seriously, I’ve been walking on air all afternoon, and I don’t really have access to IE at home. So, Google guys, you’re still much awesomer than me! But I will prove that I can get this working on stupid browsers and still spend much less time on the whole thing.

While you’re all still happily commenting, if I get it working on FF2 and IE7 will that be alright? Or should I go as ancient as IE6 and FF1.5?

EDIT an hour or so later: Alright guys, it’s now PERFECT, absolutely perfect in Safari and even FF2 (at least on mac). Tomorrow I’ll tackle IE and once I surmount that insourmountable obstacle I shall spam dzone and such yet again in hopes of a more positive response. Hey, you did all say you loved the thing save for the whole browser issues. My role is to serve the users.

---
Need a freelance developer? Email me!

You should follow me on twitter
 Subscribe to RSS

17 responses so far

  • http://a jw

    I was SO excited.

    Then….IE fail… :(

  • http://http%3A%2F%2Fdisjointthoughts.com Ben

    Nice… but it doesn’t work in IE.

  • Mike

    It also looks unbalanced on Safari and fails on Chrome.

    Maybe you should have spent more time :-)

  • http://http%3A%2F%2Ftwitter.com%2Fkonrness Konr%20Ness

    95% success rate? Now 90%. And thanks very much, but I’d rather have 100% success rate. Maybe you should have spent the extra time to do QA like Google does.

    Consider firing up a second browser before blasting other developers for taking a long time to develop something.

  • Evernoob

    Oh… poor you D:

    I hope you can get it working in IE!

    Had you rectified this before publishing you would probably have gotten a very positive response.

    Better luck next time, bro.

  • http://no.com anon

    Works nicely in FF3, doesnt even load or fail gracefully in IE6.

    As already said above, there is no point in having a go at other developers for taking a while to develop something when you have only done half the work (getting it to work in ALL the browsers is at least half the work in CSS / Javascript scripting, even when you use frameworks.)

  • http://fail.org ButtonFail

    Holier-than-thou Fail

  • Swizec

    Oh well, just when you start having some faith in a browser it fails you again.

    And I still think they took too long to develop this, because even if it takes me another 40 hours to get this thing working in IE7 it will still be a lot less time spent than what the google guys are saying they’ve spent.

    Hubris, gotta love it!

  • Evernoob

    I think IE7+ would be fine. Based on my own server stats IE usage is certainly on the decline anyway.

    People should not be using IE6. It has to die sooner or later.

  • Evernoob

    And also, don’t forget about Chrome too!

  • http://http%3A%2F%2Fblog.innovativethought.net Tim

    On the Mac – seems to work great on FF3 — doesn’t work on Safari 2 at all. Definitely a nice job… would like too see some Safari support though.

  • Broken

    Contrary to the comment above, it’s broken on FF 3.0.6 on Mac (OS X 10.5.5).

  • http://http%3A%2F%2Fwww.uplayme.com matthew

    This sucks… does not work on my FF3 on my MAC

    .. be less cocky
    … spend more time testing

  • http://http%3A%2F%2Fandyjeffries.co.uk Andy%20Jeffries

    Doesn’t work on FF3/Windows here either (the middle row of buttons are all overlayed on each other).

    Shame, Google’s buttons rock!

  • http://http%3A%2F%2Ffailfialafiafalafafa.fail fail

    fails in both IE and FF on windows xp, sucks.

  • http://n%2Fa Carl%20C

    How can you claim it works in 95% of browsers when it does not work in my FF3/Windows, IE6/Windows or Google Chrome/Windows.

    OK Chrome is the closest to a decent render, but it still does not work…..

  • Swizec

    You know what sucks about the internet? Today my firefox updated to 3.0.6 and the buttons suddenly stopped working.

« Online buzz is quite cool jQuery imageless buttons a la... »