1 Replies - 1182 Views - Last Post: 12 September 2012 - 02:27 AM

#1 if;else   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 10-September 12

How can I make my tap/pages scroll down

Posted 12 September 2012 - 01:57 AM

Hello guys am learning how to design a website but how can I make my taps/pages scroll down if someone
click on it I have been wondering how that is done a quite little bit of animation staff
Is This A Good Question/Topic? 0
  • +

Replies To: How can I make my tap/pages scroll down

#2 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4241
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: How can I make my tap/pages scroll down

Posted 12 September 2012 - 02:27 AM

Hey.

If you tag any element on your page with an id attribute, then you can use an <a> tag to link to that element by using #<the_id> as the src.

Like, say you have this header element somewhere:
<h1 id="part1">Part 1</h1>


A <a> tag like this will cause the page to immediately scroll to that <h1> element.
<a href="#part1">Part 1</a>



More elaborate animations can be achieved using Javascript. For instance, the jQuery.ScrollTo plugin allows you to that in various different ways.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1