yairEO / fancyInput

Makes typing in input fields fun with CSS3 effects
1.93k stars 283 forks source link

Remove The Demo Text #27

Closed hristijan5 closed 10 years ago

hristijan5 commented 10 years ago

Dear, If I want to remove the demo text from the input type let's say "onclick()" how should I do it? I can see that there is: clear : function(textCont)

How do I call it.

Thanks and sorry for the beginner's question .

yairEO commented 10 years ago

everything is handles automatically, i don't really understand the question..if there was a value in the placeholder attribute, it will vanish when the field get focused.

hristijan5 commented 10 years ago

So to make thinks a bit more clear. If you check this demo of fancy input: http://dropthebit.com/demos/fancy_input/fancyInput.html you will see that there is "type something... ✌" text in the input field. I want to remove it when I click with the mouse in the input field. I was thinking of having a "onclick()" attribute of the input field that calls some function i.e "clear()". My question was how can this function clear the text in the input field? Thank you!

yairEO commented 10 years ago

it already works this way out-of-the-box. please ignore how the demo works completely, it's not how it really works when using the placeholder attribute. you can try it yourself.