Live data from Hacker News

JQuery Super Labels Plugin

github.com

1–10 of 18 posts

Re: JQuery Super Labels Plugin

#5
Seems OTT to me,

I generally use normal boring labels, then modernizer to detect if the browser supports placeholders, if so hide the labels and add placeholders to the attributes

Re: JQuery Super Labels Plugin

#7
post #6

FWIW, Safari and Chrome both keep placeholder text there like this plug-in does (without the animation). It'd be nice to get FireFox on board.

Yes, in -webkit- browsers you can achieve the same effect with this CSS:

        &::-webkit-input-placeholder {
            -webkit-transition: text-indent 200ms ease-in-out;
            visibility: visible !important;
        }

        &:focus::-webkit-input-placeholder {
            text-indent: 115px; /* Change to width of input */
        }
If only you could do the same for Firefox...

Re: JQuery Super Labels Plugin

#8
post #6

FWIW, Safari and Chrome both keep placeholder text there like this plug-in does (without the animation). It'd be nice to get FireFox on board.

Yes, in -webkit- browsers you can achieve the same effect with this CSS: &::-webkit-input-placeholder { -webkit-transition: text-indent 200ms ease-in-out; visibility: visible !important; } &:focus::-webkit-input-placeholder { text-indent: 115px; /* Change to width of input */ } If only you could do the same for Firefox...

https://developer.mozilla.org/en/CSS/:-moz-placeholder

Re: JQuery Super Labels Plugin

#10
post #5

Seems OTT to me, I generally use normal boring labels, then modernizer to detect if the browser supports placeholders, if so hide the labels and add placeholders to the attributes

That's not what placeholders are meant to be used for though (see here: http://www.whatwg.org/specs/web-apps/current-work/multipage/...).

This plugin doesn't replace (true) placeholder functionality, so I suppose it's the same as what you're doing except more semantic.

Post reply on HN