Responsive Tabs / Posts /

Logo Link back to first tab

22
I have a tall header. I would like the logo and footer "home"  to link to the first tab. But when you add the "#first-tab" link to the logo, it jumps further down the page to the id="first-tab" and you lose the whole header. Is there a way to prevent this from happening?
Christi  3 years ago   viewed: 5077    

9 Answers

-1
Humm...check out this site to see what I mean:  http://ianalytics.designtheplanet.com/   

So now the logo at the top has the /#profile ....but when you click that it jumps down half way down the page, where I'd like it to stay at the top of the page but be on the profile page.
Christi   3 years ago
1
I think you can mark the link as: http://ianalytics.designtheplanet.com/#profile?data-scroll=false
Milo   3 years ago
1
Didn't work  :(  Any other thoughts. 
Christi   3 years ago
0
Did you really try it? When I click your logo, it navigates to http://ianalytics.designtheplanet.com/#profile, not  http://ianalytics.designtheplanet.com/#profile?data-scroll=false
Milo   3 years ago
0
I noticed that it went away, see attached screenshot of link from chrome inspector ( http://ianalytics.designtheplanet.com/blog/wp-content/uploads/2013/10/Screen-Shot-2013-10-02-at-4.06.04-PM.png ).
Christi   3 years ago
1
Can you make it not go away? 
Milo   3 years ago
0
Did you try:
<ul id="tabs1" class="mctabs">
        <li><a href="home.html#first-tab">Home</a></li>
        ........
Joe   3 years ago
0
I made the logo be at top:0 when it's not in view. I'm wondering if some kind of jQuery function would be the way to go?
Christi   3 years ago
0
Well I figured something out jquery wise...it's probably a little dirty since jquery isn't my strongest skill, but it works: $(document).ready(function() { $('#footer-logo').click(function(e){ $( '#footer-logo' ).show(); window.location.hash = "profile"; $('html, body').animate({scrollTop:$('#footer-logo')}, 'fast'); e.preventDefault(); }); $('#top-logo').click(function(e){ $( "#top-logo" ).show(); window.location.hash = "profile"; $('html, body').animate({scrollTop:$('#top-logo')}, 'fast'); e.preventDefault(); }); });

Christi   3 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: