Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0
WelcomeVitality

Custom Text In Search Bar

Question

9 answers to this question

Recommended Posts

  • 1
8 hours ago, cherylr said:

I am trying to do this as well.

Here's a link to my site: https://mark-russell-o43o.squarespace.com/

Add to Code Injection Footer

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('.sqs-search-page-input input').attr('placeholder','Tuan Tuan Tuan Tuan Tuan');
</script>

 


You can send your question to my email to get faster answer. I provide free priority support in this crazy time. 

Forum: I usually answer questions at 2pm - 5pm EST

How to Setup Password & Share URL - Squarespace Free Templates - Free Code - CSS ID List

Share this post


Link to post
  • 0

Worked for me. For Avenue template I had to use a slightly different class

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('.sqs-search-ui-text-input input').attr('placeholder','Buscar');
</script>

 

Share this post


Link to post
  • 0
On 2/2/2020 at 7:30 PM, tuanphan said:

Add to Code Injection Footer


<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('.sqs-search-page-input input').attr('placeholder','Tuan Tuan Tuan Tuan Tuan');
</script>

 

Hi Tuan!

I am also looking to do this, however my pages will have multiple search boxes that all need to have different display text. For example, the left one could say "Search by Neighborhood" and the right one could be "Search by Address". How can I target them individually? I assume I need to reference the yui ids, but I'm not exactly sure how to tackle that. Maybe you can help? Please and thank you!

The url is https://crocodile-pigeon-9mmr.squarespace.com/scratch

 

Share this post


Link to post
  • 0
21 hours ago, PrismaVisual said:

Hi Tuan!

I am also looking to do this, however my pages will have multiple search boxes that all need to have different display text. For example, the left one could say "Search by Neighborhood" and the right one could be "Search by Address". How can I target them individually? I assume I need to reference the yui ids, but I'm not exactly sure how to tackle that. Maybe you can help? Please and thank you!

The url is https://crocodile-pigeon-9mmr.squarespace.com/scratch

 

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('div#block-yui_3_17_2_1_1588863336914_16498 .sqs-search-page-input input').attr('placeholder','Search mot');
  $('div#block-yui_3_17_2_1_1588863336914_18386 .sqs-search-page-input input').attr('placeholder','Search hai');
</script>

 


You can send your question to my email to get faster answer. I provide free priority support in this crazy time. 

Forum: I usually answer questions at 2pm - 5pm EST

How to Setup Password & Share URL - Squarespace Free Templates - Free Code - CSS ID List

Share this post


Link to post
  • 0
On 5/8/2020 at 10:28 AM, tuanphan said:

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('div#block-yui_3_17_2_1_1588863336914_16498 .sqs-search-page-input input').attr('placeholder','Search mot');
  $('div#block-yui_3_17_2_1_1588863336914_18386 .sqs-search-page-input input').attr('placeholder','Search hai');
</script>

 

Thanks so much Tuan! However I've not been able to get this to work. 😞  The content has since been relocated. I did identify and target the new block yui id's but nothing happens. The new environment is 7.1 (it was formerly 7.0) maybe that's why? Does this script have to go somewhere other than the Code Injection Footer when working in 7.1?

The new url is:  https://tomato-lynx-pzwm.squarespace.com/

password: bennythejet

Share this post


Link to post
  • 0
21 hours ago, PrismaVisual said:

Thanks so much Tuan! However I've not been able to get this to work. 😞  The content has since been relocated. I did identify and target the new block yui id's but nothing happens. The new environment is 7.1 (it was formerly 7.0) maybe that's why? Does this script have to go somewhere other than the Code Injection Footer when working in 7.1?

The new url is:  https://tomato-lynx-pzwm.squarespace.com/

password: bennythejet

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$('div#block-yui_3_17_2_1_1589218491243_29604 input').attr('placeholder','Search mot');
  $('div#block-yui_3_17_2_1_1588964900710_39076 input').attr('placeholder','Search hai');
</script>

 


You can send your question to my email to get faster answer. I provide free priority support in this crazy time. 

Forum: I usually answer questions at 2pm - 5pm EST

How to Setup Password & Share URL - Squarespace Free Templates - Free Code - CSS ID List

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment


×
×
  • Create New...