I have a text that when it's clicked, it becomes a textarea using the editable function from js. How can I add a placeholder text to that area? i tried to search it in the dom using $('textarea') but I had no luck. I also use backbone model and view to generate the views.
Asked
Active
Viewed 137 times
1
-
can we get some example html coming out of this? it will help with the selector accuracy – DefyGravity Mar 11 '13 at 14:14
1 Answers
1
I'll update the selector in a bit, but right now this will work:
$("form :text").attr("placeholder",what you want);
html gotcha, make sure the <textarea></textarea> are on the same line, otherwise "\n" will be the default value regardless of the placeholder value.
Community
- 1
- 1
DefyGravity
- 5,681
- 5
- 32
- 47