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

Alternate logo on different pages code not working


sanluistacos
Go to solution Solved by tuanphan,

Question

Site URL: https://www.actuatelaw.com/services

When I originally uploaded this code for a client to swap out a different logo color on a different page, it was working. However, recently something has changed and it's no longer displaying. Any help on how to change it? I originally inserted this code into the page's header:

<style>
.header-title-logo a {
    content: url("https://static1.squarespace.com/static/5ee7ac6c0dd81c33d50f18c1/t/5f04adb33d7efb7d6678fdd3/1594142131192/actuate_horizontal_white.png");
  }
</style>

 

Here is the page where it's not displaying: https://www.actuatelaw.com/services

Link to post
  • Answers 6
  • Created
  • Last Reply

Top Posters For This Question

Top Posters For This Question

Popular Posts

I tried the first css approach and found it didn't work in firefox. ( was fine in chrome and safari) Here's a way to do it in vanilla javascript without calling jquery. <script> var rea

6 answers to this question

Recommended Posts

  • 0

Remove above code & add this to Page Settings > Advanced > Header

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.0/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('.header-title-logo img').attr('src','https://beaverhero.com/wp-content/uploads/2019/12/squarespace-03-language-sites.png');
});
</script>

 

You can send your question to my email to get detail answer. / How to Setup Password & Share URL

--- Happy New Year

Link to post
  • 0

Thank you! However it won't let me place my image upload in place of where you have yours. (I delete your line from 'https://' and replace with my upload) Any reason for this?

Edited by sanluistacos
Link to post
  • 0
On 9/29/2020 at 3:05 AM, sanluistacos said:

Thank you! However it won't let me place my image upload in place of where you have yours. (I delete your line from 'https://' and replace with my upload) Any reason for this?

UPload the image follow this guide. https://support.squarespace.com/hc/en-us/articles/205813928-Uploading-and-managing-files

You can send your question to my email to get detail answer. / How to Setup Password & Share URL

--- Happy New Year

Link to post
  • 0

I tried the first css approach and found it didn't work in firefox. ( was fine in chrome and safari)

Here's a way to do it in vanilla javascript without calling jquery.

<script>
var ready = (callback) => {
  if (document.readyState != "loading") callback();
  else document.addEventListener("DOMContentLoaded", callback);
}

ready(() => { 
  /* Do things after DOM has fully loaded */ 
  document.querySelector('.header-title-logo a img').setAttribute('src','IMAGE_PATH')
});
</script>

Replace IMAGEPATH with a path to a file you uploaded. Full credit to this solution  https://tobiasahlin.com/blog/move-from-jquery-to-vanilla-javascript/

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...