Jump to content

OzzyH

Member
  • Posts

    3
  • Joined

  • Last visited

Reputation Activity

  1. Like
    OzzyH reacted to tuanphan in How to change search box placeholder on specific pages?   
    Remove code from Footer
    Next edit page where you want to change this > Add a Code Block (anywhere on page, except footer) > Add this code
    <script> window.addEventListener('DOMContentLoaded', changeSearchPlaceholder); function changeSearchPlaceholder() { let newText = "Search Me"; let searchBars = document.querySelectorAll('.search-input'); searchBars.forEach(el => el.placeholder = newText) } </script>  
  2. Thanks
    OzzyH reacted to tuanphan in When I add <a href> to code blocks it breaks my homepage   
    Hi,
    Your a tag missing closing tag
    If you use <a> you need to add a closing </a>
    <a href="https://dragonfly-pentagon-ym6h.squarespace.com/directory"> <img src="https://static1.squarespace.com/static/6238af5e19bb205556416810/t/625345f3de22634c0986fa0d/1649624563271/searchVectorPart1.png" onmouseover="this.src='https://static1.squarespace.com/static/6238af5e19bb205556416810/t/625344a058497c282010c687/1649624224879/searchVectorsecond.png'" onmouseout="this.src='https://static1.squarespace.com/static/6238af5e19bb205556416810/t/625345f3de22634c0986fa0d/1649624563271/searchVectorPart1.png'"> </a>  
  3. Like
    OzzyH reacted to creedon in When I add <a href> to code blocks it breaks my homepage   
    For those interested elements without closing tags are known as empty elements. As @tuanphan points out the a tag is not one of them. Not closing non-empty tags can produce very odd page renderings!
    There is a list of allowed empty elements on MDN.
×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.