Jump to content

jambamoose

Circle Member
  • Posts

    5
  • Joined

  • Last visited

Posts posted by jambamoose

  1. @tuanphan Thanks for the reply...Here's my code, still having some trouble..

     

    <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
    <script>
      
    var topIMG = $(".header-title-logo img").attr("src");
    var sclIMG = "https://static1.squarespace.com/static/5f2adc20b7290058dd53441e/t/5f5e7c1988ce6e3f57804e53/1600027673615/HBA-Logo-Website.png";

    $(window).scroll(function() {
       var value = $(https://static1.squarespace.com/static/5f2adc20b7290058dd53441e/t/5f5e7c1988ce6e3f57804e53/1600027673615/HBA-Logo-Website.png).scrollTop();
       if (value > 50)
          $("https://static1.squarespace.com/static/5f2adc20b7290058dd53441e/t/5f5e7c1988ce6e3f57804e53/1600027673615/HBA-Logo-Website.png").attr("src", sclIMG);
       else
          $(".header-title-logo img").attr("src", topIMG);
    });
      
      
    </script>

  2. On 9/22/2020 at 1:27 PM, rwp said:

    @jambamoose give this a shot

    
    var topIMG = $(".header-title-logo img").attr("src");
    var sclIMG = "";
    
    $(window).scroll(function() {
       var value = $(this).scrollTop();
       if (value > 50)
          $(".header-title-logo img").attr("src", sclIMG);
       else
          $(".header-title-logo img").attr("src", topIMG);
    });

     

    @rwp I inserted that into my header code, and then inserted the URLs for the two image uploads in the spots you have marked in quotes, but it doesn't seem to be working. Guessing I'm doing something wrong...Feel free to check my code.

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