News for hackers. Stuff that matters.
Re:JQuery Super Labels Plugin by phzbOx on Monday May 14, 2012 @10:11AM (#3971121)
It's cute but too much distracting IMO. I prefer to have it fade a little bit on focus and disappear on writing.
Re:JQuery Super Labels Plugin by remybach on Monday May 14, 2012 @12:43PM (#3971831)
There's an option to do that:

$('form').superLabels({ slide:false });

Re:JQuery Super Labels Plugin by 5h on Monday May 14, 2012 @10:21AM (#3971161)
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 by remybach on Monday May 14, 2012 @12:46PM (#3971840)
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.

Re:JQuery Super Labels Plugin by remybach on Monday May 14, 2012 @12:51PM (#3971865)
Oh, also... once you're in the field, the placeholder disappears and you have no idea what you were meant to type (which is why the plugin slides to the side by default).
Re:JQuery Super Labels Plugin by flixic on Monday May 14, 2012 @01:23PM (#3972043)
No. Placeholders stay visible until user starts typing. That is, empty focused field still has visible placeholder.
Re:JQuery Super Labels Plugin by Skalman on Monday May 14, 2012 @02:24PM (#3972404)
Only in Chrome. Not in Firefox, at least.
Re:JQuery Super Labels Plugin by remybach on Monday May 14, 2012 @03:36PM (#3972755)
True! It wasn't like this when I wrote the plugin though, plus I needed the effect to work cross-browser.
Re:JQuery Super Labels Plugin by jonknee on Monday May 14, 2012 @10:22AM (#3971166)
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.
Re:JQuery Super Labels Plugin by Keithamus on Monday May 14, 2012 @10:37AM (#3971228)
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 by btucker on Monday May 14, 2012 @11:52AM (#3971545)
Re:JQuery Super Labels Plugin by remybach on Monday May 14, 2012 @12:50PM (#3971857)
I had looked into doing this with pure CSS, but I hit a roadblock. I can't remember what it was, but it may have been the Firefox thing mentioned. Would be cool to add a css file that does the same to the project when the support is there though.
Re:JQuery Super Labels Plugin by egze on Monday May 14, 2012 @10:04AM (#3971086)
Should probably use stop() before animating or else there's a funny effect if I click the fields back and forth really fast.
Re:JQuery Super Labels Plugin by remybach on Monday May 14, 2012 @12:52PM (#3971871)
Hmmm... not quite a real-world scenario though. I like to consider it a quirky easter-egg :)
Re:JQuery Super Labels Plugin by david_a_r_kemp on Monday May 14, 2012 @10:10AM (#3971117)
how do you get the labels back again? sometimes my browser or password manager fills in the wrong fields, and, once there's something in the fields, there's no labels.
Re:JQuery Super Labels Plugin by remybach on Monday May 14, 2012 @12:48PM (#3971844)
Yeah, I've got an issue open on github for this. I'll fix it when I get the chance. Thanks :)