Created
November 5, 2013 18:07
-
-
Save anthonyshort/7323390 to your computer and use it in GitHub Desktop.
Float labels with Reactive: http://mattdsmith.com/float-label-pattern/ Just set the title on the model when
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.floatLabel { | |
transition: all 1s ease-in-out; | |
position: relative; | |
} | |
.floatLabel.hide { | |
opacity: 0; | |
top: 3px; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<span data-show="title" class="floatLabel">Title</span> | |
<input type="text" on-input="set" name="title" placeholder="Title" /> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = { | |
set: function(e){ | |
this.reactive.set(e.target.name, e.target.value); | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment