Web Development for 2012

Alexander Dickson - Web Developer covering PHP, jQuery / Javascript, XHTML, CSS, more

Git, GitHub and inputLabel 2.0

Published on Friday, 11th February 2011.

I decided late last year that if I wanted to get into version control, it would have to be in my own time. Armed with zero knowledge (but hungry), I went hunting for information.

I picked up Pragmatic Version Control Using Git by Travis Swicegood a month or so ago, and have been reading it carefully and slowly.

I chose Git basically because I thought GitHub looked cool, plus Kohana uses it :). I pushed my latest project to it tonight, which is a massive update to my inputLabel project.

My inputLabel jQuery plugin was a bit dodgy in that it replaced the actual value of the input elements with its label. This made a few things a nightmare, such as validating the input fields using existing libraries.

My new version (2.0) does away with these problems, or it passed all the tests I could think of at 1am. I hope to be using it in all new projects requiring the use of this functionality.

Comments

  • Andrew Cobby

    Posted on Friday, 18th February 2011 @ 1:44pm.

    @Alexander

    It would good if you could do that; with HTML5's current placeholder implementation, you can't use it simultaneously with the focus attribute... A quick loading page will give the element focus very quickly, removing the placeholder text so you can't see what the field is for....

  • Alexander Dickson

    Posted on Friday, 11th February 2011 @ 2:32pm.

    @Andrew
    Cheers, I considered that attribute, but decided against implemented it in this release.

    I'm also going to see if I can stop the label from disappearing when tabbing to it, so you don't lose the label before you start typing. :)

  • Andrew Cobby

    Posted on Friday, 11th February 2011 @ 12:45pm.

    Good to see you getting on the Git band-wagon too! I've been using it for a few months and I'm getting the hang of it, wayy better than SVN.

    Also, have you considered a version of your inputLabel that sources from the HTML5 placeholder attribute? (to provide backwards compatibility for non-HTML5 browsers)

Leave a Comment

Comment Details

Your email will never be displayed. If you have a gravatar, it will be displayed.

Note: Your comment may require approval before it is posted to the site.

Stack Overflow Profile

view full profile »

About

I'm a web developer from the Sunshine Coast, Australia. more »