jackrugile / placeholdem Goto Github PK
View Code? Open in Web Editor NEWPlaceholder Caret Animation
Home Page: http://placeholdem.jackrugile.com
License: MIT License
Placeholder Caret Animation
Home Page: http://placeholdem.jackrugile.com
License: MIT License
when using ng-model on the form tags placeholdem works in reverse. the placeholder is not visible but once you focus into another input area the place holder in the previous input animation starts from 0 letters and then animates to the word.
Hi, I'm trying to implement Placeholdem but I get this error on line:
PE.placeholder = PE.elem.getAttribute( 'placeholder' );
I can duplicate it by trying to get the placeholder attribute of my querySelectorAll results in the console:
var elem = document.querySelectorAll("[placeholder]");
elem.getAttribute('placeholder');
TypeError: Object #<NodeList> has no method 'getAttribute'
If I change the second line to
elem[0].getAttribute('placeholder');
it returns the placeholder string correctly.
On the demo site if I execute
Placeholdem( document.querySelectorAll( '[placeholder]' ) );
in the console I get the same error.
Am I missing something?
There is a issue when we do the validation using html5 'required' attribute. It validate the text-box for email because it is having the type="email", but for simple type="text" it is considering the placeholder value as it's actual value. Please check it once.
i am using it in my project and if i remove your js validation works perfectly and if i add it then my required field validation stopped working.
Hey Jack,
I love the placeholdem but there is an issue, after reset/clear the form it doesn't restore the original placeholder value unless you click on it and turn blur again. Would you mind improving this? Look forward to the solution. Thx.
Nicole
Hi,
Found little wrong plugin's work with input[type=email] and input[type=password]
Here is an example http://jsfiddle.net/bBLE8/
Map the deletion and restoration to a label, or specified element, that gets the inverse of the input or textarea. This came to mind when reading http://css-tricks.com/float-labels-css/
Losing the placeholder text altogether can be annoying, so this would be a nice option. Most likely add an option called "label", where a selector can be specified. Or this can be a boolean value, and the link will be automatically connected to either the nearest label, or label with a matching "for" to the "id" of the Placeholdem element.
Link to help you : http://bower.io/
Subj; please do not remove "placeholder" attribute and do not alter "value" of element (or at least set something like data-original-placeholder, so it's possible to find out if the field is changed at all). The current behavior makes placeholder senseless and breaks semantics.
Placeholdem seems to over-ride the browser default colour/opacity of the placeholder text. There are ways to style placeholder text, but they vary between browsers and are therefore tedious to apply.
Would it be possible to include some default (or even editable) styling in 'placeholdem'?
I know this is probably a stupid question for github, but how can one add this to wordpress theme?
If this question is way too stupid just close it.
In any case, thanks for this js!
hello.
it's possible to set a delay for running the animation (after event) and a animation time ?
for example if I want that animation to start only 1 second after i click (focus) the input box , and the animation to be more slower.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.