Jump to content

Click on Logo to make dropdown menu appear

Recommended Posts

  • Replies 8
  • Views 523
  • Created
  • Last Reply
On 1/17/2021 at 3:25 AM, tuanphan said:

Do you still save the code that I sent a few days ago, click icon> Show search? You can resend it, we just need to tweak a few lines in the code for this case.

@tuanphan Here it is. Hope you can help?

 

<style>
  div#block-yui_3_17_2_1_1609719753415_7376 {
    display: none;
}
  .t-show {
  	display: block;
  }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  $(document).ready(function() {
      $("div#block-yui_3_17_2_1_1609720252520_14008").click(function(){
  $("div#block-yui_3_17_2_1_1609719753415_7376").addClass("t-show");
});
})
</script>
Link to comment
On 1/17/2021 at 3:25 AM, tuanphan said:

Do you still save the code that I sent a few days ago, click icon> Show search? You can resend it, we just need to tweak a few lines in the code for this case.

 

On 1/21/2021 at 4:24 PM, SolveigTraeet said:

@tuanphan Here it is. Hope you can help?

 


<style>
  div#block-yui_3_17_2_1_1609719753415_7376 {
    display: none;
}
  .t-show {
  	display: block;
  }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  $(document).ready(function() {
      $("div#block-yui_3_17_2_1_1609720252520_14008").click(function(){
  $("div#block-yui_3_17_2_1_1609719753415_7376").addClass("t-show");
});
})
</script>

 

@tuanphan Can you help me with the code?

I want to click on my logo, to make the dropdown menu appear. 

Site URL: https://caper-badger-3s6d.squarespace.com/about

Password: home

Link to comment

Try adding to Page Header

<style>
.header-nav {
    visibility: hidden;
}
  .t-show {
  	visibility: visible;
  }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  $(document).ready(function() {
      $(".header-title-logo img").click(function(){
  $(".header-nav").addClass("t-show");
});
})
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment
On 1/24/2021 at 3:27 AM, tuanphan said:

Try adding to Page Header





<style>
.header-nav {
    visibility: hidden;
}
  .t-show {
  	visibility: visible;
  }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  $(document).ready(function() {
      $(".header-title-logo img").click(function(){
  $(".header-nav").addClass("t-show");
});
})
</script>

 

 

@tuanphan Thank you, But when I added this code to home page, this happened:

I clicked on the site logo, the title ''menu'' appeared, but the site re-loaded, like it thought I wanted to enter my home page, even though I was already on my home page. 

Do you have a code that removes the default url (which is home page) when I click on site logo. I do not want the site logo to have a default url. I want to remove any page url connected to the site logo. I also wish to remove the title ''menu''. 

I just want to click on the site logo (on all pages), and make the Folder Nav appear.

Click on site logo -> Directly to Folder Nav (remove default url and the title ''menu'') 

Link to comment
On 1/28/2021 at 8:16 AM, SolveigTraeet said:

@tuanphan Do you have time to complete the code you gave me? it does not work.

The site logo's url link interferes with the custom code you gave me. The url link in site logo needs to be removed first, for this to work. Can you help?

Hi. Sorry for the delay. I was off some day.

Try new code

<style>
.header-nav {
    visibility: hidden;
}
  .t-show {
  	visibility: visible;
  }
</style>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
  $(document).ready(function() {
    $('.header-title-logo a').removeAttr("href");
      $(".header-title-logo img").click(function(){
  $(".header-nav").addClass("t-show");
});
})
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Link to comment

Archived

This topic is now archived and is closed to further replies.

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