GithubHelp home page GithubHelp logo

jackrugile / placeholdem Goto Github PK

View Code? Open in Web Editor NEW
372.0 372.0 49.0 61 KB

Placeholder Caret Animation

Home Page: http://placeholdem.jackrugile.com

License: MIT License

CSS 73.08% JavaScript 15.50% HTML 11.42%

placeholdem's People

Contributors

jackrugile avatar jayvin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

placeholdem's Issues

ng-model and placeholdem

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.

Object #<NodeList> has no method 'getAttribute'

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?

validation using html5

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.

doesn't restore placeholder after reset form

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

Add Label Support

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.

Placeholder shouldn't alter value

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 - colour of placeholder text

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'?

Wordpress implementation

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!

placeholdem.js - delay and animation time

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.