javascript - Set label to full opacity on input field focus -


i have great bit of code sets label 0.5 opacity when input field on focus. now, i'd set 0 (100% invisibility) if possible.

can out this?

here's fiddle: http://jsfiddle.net/d8apy/5/

my html:

<div class="fieldgroup">     <label for="name">name</label>     <input type="text" id="name" name="name"> </div><!--/.fieldgroup--> 

my css:

* {     -moz-box-sizing: border-box;     -webkit-box-sizing: border-box;     box-sizing: border-box;     font-family: arial; } .fieldgroup {     position: relative; } input[type='text'], label {     padding: 5px;     font-size: 16px;     line-height: 16px;     margin: 0;     height: 30px;     color: #fff;     display: block; } input[type='text'] {     border: none;     background: green; } 

i using jquery plugin: http://fuelyourcoding.com/in-field-labels/

many pointers :-)

when apply plugin lables can set opacity passing in options object so:

$("label").infieldlabels({ fadeopacity:0.0 }); 

Comments