开发者

using href links to go to specific section within website

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


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜