Reputation: 1523
i am trying to change pleaceholder text when document loads, i tried following code but it's not working,
HTML:
<textarea id="nf-field-195" name="nf-field-195" class="ninja-forms-field nf-element"
placeholder="Please provide a brief description of your facility" required=""></textarea>
JS:
<script>
jQuery(document).ready(function( $ ){
$('#nf-field-195').attr('placeholder','Some New Text 1');
});
</script>
Upvotes: 0
Views: 44
Reputation: 1216
This should work:
selectedTextarea = $('#nf-field-195')[0];
selectedTextarea.placeholder = "Placeholder text";
Upvotes: 1