Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Apr 2013
    Posts
    72
    Member #
    36068
    Liked
    1 times
    Just a question about href links.

    http://shanuea.lockernerd.co.uk/camel/

    In the portfolio section of my page when you click one of the ribbons it calls a jquery to hide-all show-one (of the content) and also to jump to the top with a href link (actually not quite the top, just to an invisible div slightly above the content)
    Problem is, it works no worries if your browser is above the scroll-to point but if you're below and the content of the div that shows is smaller than the one that hides - the browser doesn't jump.

    If the content that shows is larger than the one that hides it jumps there no problem.

    Here's an example of the href setup (#scrollto is the invisible div it should go to):

    <a href="#scrollto" onmouseover="MM_swapImage('positivescroll','','*** ets/images/scroll/positivescrollorange.png','positivethumb','','asse ts/images/thumbs/positivethumbroll.jpg',1)" onmouseout="MM_swapImgRestore()"><img src="assets/images/scroll/positivescroll.png" name="positivescroll" width="156" height="37" border="0" id="positivescroll" onclick="javascript:showonlyone('positivecontainer ');MM_showHideLayers('portorange','','hide','qrtso range','','hide','silverorange','','hide','crestor ange','','hide','pinorange','','hide','voodooorang e','','hide','charlieorange','','hide','reportoran ge','','hide','tafeorange','','hide','positiveoran ge','','show','hiporange','','hide','mosaicorange' ,'','hide','mininav','','hide')"/></a>

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    The thing with anchor link references ... They are absolute references. Regardless of how you call them... If you want the whole page ( header, nav, etc ) to show when a user click the "back to top"... You have to put your tag at the very beginning of the "body" tag. Anything else, when coming from below... And its just going to position the content exactly starting where the tag is actually embedded..

    If that's not what you're wanting, you'll need to post a link to the page so we can actually see the code in action.

  4. #3
    Member
    Join Date
    Apr 2013
    Posts
    72
    Member #
    36068
    Liked
    1 times
    Thanks Webzarus. The problem is kind of had to describe. The website's below.
    If you click on "portfolio", then click on "voodoo", then scroll up a little bit then click on "QRTS" it jumps to the top of QRTS as I want it to.

    However if you do the same thing - but after clicking "voodoo" scroll down to the bottom and then click "QRTS" it just jumps to the bottom of the QRTS content. (because that content is shorter than the other). Same thing for the other links with larger or smaller content.

    Sorry if I made it too complicated.

    Website:
    http://shanuea.lockernerd.co.uk/camel/


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Search tags for this page

a href not working

Click on a term to search for related topics.
All times are GMT -6. The time now is 12:39 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com