yairEO/fancyInput

Remove The Demo Text

hristijan5 opened this issue · 3 comments

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 .

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.

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!

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.