tags:

views:

229

answers:

1

I am trying to link some text with the href tag to a specific section in my website.

On the homepage I have a quote and then the person's name of who said it. I want to link his name to the "Upcoming Events" tab on my "About" section.

The website is http://www.verticalministries.net. The name "Aaron Ivey" needs to be linked to the "Upcoming Events" tab under the "About" section. The website is a one-page portfolio that scrolls using JavaScript.

I have tried using the name attribute, but that wasn't working because the href tag would look like
<a href="#about#ivey>Aaron Ivey</a> and that just isn't valid code, because I have the page scrolling via classes. I did check the name attribute and I did give it #ivey.

<div class="fifth_page" style="display:none"> 
            <h1>Upcoming Events</h1>
                <h4>Feb. 15 &#45; Aaron Ivey Band</h4> 
                <a name="#ivey"></a>
                <img src="images/iveypromo.jpg" alt="Aaron Mug Shot" class="floatRight img_left_space" />
               <p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;“Aaron Ivey believes that all worship is a response to a creative and compelling God.  Serving as one of the worship pastors at <a href="http://www.austinstone.org" target="_blank">The Austin Stone</a>...</p>  
      </div>

Any help would be greatly appreciated.

If you have any further questions, please let me know.

Thank you.

Sincerely,

DHJolesch

+3  A: 

don't use attribute name it's deprecated, rather use id

example code, how to jump with an anchor to a div with specified id:

<a href="#your-page-element">Jump to ID</a>

<div id="your-page-element">
    will jump here
</div>

Also for scrolling animations with jQuery look at How can I scroll to a specific location on the page using jquery?

Juraj Blahunka
It's not working. I did that and it just hangs there. It won't refresh the page and it won't move to where I put the div.Any other options?I know nothing about jQuery (it'a template I bought) so that link you also attached I looked at it, but wasn't sure how to do any of it.Thanks.DHJolesch
dhjolesch