Reputation: 5
I cannot edit the HTML directly because Squarespace does not allow that, only JS and Jquery can be used.
$("#field city :input").attr('placeholder', 'City');
I tried using this but it doesn't work
<div class="field city">
<label class="caption"><input class="field-element field-control" name="" x-autocompletetype="" type="text" spellcheck="false" data title="">
</label>
</div>
Thanks in advance
Upvotes: 0
Views: 94
Reputation: 1506
Check this js fiddle..
<div class="field city">
<label class="caption"><input class="field-element field-control" name="" x-autocompletetype="" type="text" spellcheck="false" data title="">
</label>
</div>
<script>
document.getElementsByClassName('field-element')[0].placeholder='city'
</script>
Upvotes: 0