Adrian Stoch
Posts: 0
Joined: Thu Jul 31, 2014 3:09 pm

Change placeholder

Quick simple request please:
Can you advise on how to change placeholder of a text area programmatically.

Kateryna Grynko
Posts: 0
Joined: Thu Nov 15, 2012 9:13 am

Change placeholder

Hi Adrian,

Please try the following code:preApperyio("mobiletextarea_X").attr("placeholder", "Some text");/preWhere mobiletextarea_X is a textarea name and Some text is any text you need.

Adrian Stoch
Posts: 0
Joined: Thu Jul 31, 2014 3:09 pm

Change placeholder

Perfect, thanks Katya.

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

Change placeholder

How would I change the font color of the placeholder text with javascript?
I tried

pre
Apperyio("inputName").attr("placeholder", "some text ").css('color','#ff0000');
/pre

and

pre
$("[name=a1]").attr("placeholder", "some text ").css('color','#ff0000');
/pre

They both changed the placeholder text to 'some text'
but neither of these changed the text color.

Illya Stepanov
Posts: 0
Joined: Mon Mar 18, 2013 8:48 am

Change placeholder

Hi Joe --

Please take a look here: http://stackoverflow.com/questions/14...

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

Change placeholder

Thank you.

Return to “Issues”