I am using the following sample to display text in the background of the text box. This is working well
Problem:
I want to increase the text box. The box appears that it has expanded, but the actual size is not expanded while typing. I want to type the text up to 600px.
Geeta.
$ ("input: input"). Keypress (function {var o = $ (this); var s = $ ("& lt; span & gt; & lt; / span & gt;"). Html (o.val ()). (Cloud ' , 'Placeholder'). CSS ('left', '99 99px'); if (overwidth () <600) {o.parent (.). Append (s); if (s.outerWidth) Gt; O.outerWidth ()) {o.css ("width", s.outerWidth ())}} Remove $ ("span.placeholder") ();}});
I tested this and it works very well, not bad for 7 minute code / test / burn.
Comments
Post a Comment