

Line 7 › var color = $( this ).attr( "class" ) → This value will be used for scrolling to the respective page. → This value is then assigned to the variable page. → This statement will fetch the value of the attribute id from the clicked link. Line 6 › var page = $( this ).attr( "id" ) → This is a On Click listener for the class="link".
PARALLAX MENU HTML CODE
→ For executing code when a page is rendered completely. This code will also highlight the clicked link by assigning class="active" to the clicked link.įor the Parallax Scrolling Effect we will use the jQuery’s animate property to animate the. This code will take the check the id for the “Page no” and the last six characters of the class for the “Page Background Color”. We have also used the background CSS property for the tag to fill it with background. This way only the Pages will scroll with all the inside it. įor this we will use the position:relative CSS property for and position:absolute for the containig all pages with. Style the Pages, Background and Navigational Menu using Stylesheetįor the Parallax effect we need to position the pages one after another to view each page one by one.įor arranging the pages side by side we will use the CSS float:left property.Īfter arranging the Pages we need to hide the other two pages when one page is viewed.įor this we will have to create a mask that allows us to see only that content which is inside the mask.įor the masking effect we will use the overflow:hidden CSS property for id="container".įor the scrolling effect we will scroll the pages with respect the. When clicked on another link this class="active" will be assigned to it. The First link Home has another class="active" which highlights the link. The second class is the “Hex Color Code” which assigns the color to the background of the Page ( tag ). The class="link" is compulsory, required for the Parallax scrolling. The first class is the “link” and the second class is “Hex Color Code”. The Links have two classes separated by space. When clicked on this link, the first will scroll into view. The id's will be numerical values which denotes the Page number.

We will use id="menu" later for positioning the Navigational Links later using CSS Stylesheet. Here we have created a that contains the Navigational Link. These links are created using tags, with each having same class="link" and separate id's. The Parallax Scrolling Effect will be executed when we click on these links. This order must be same as the Navigation links which we will create in the next Step. Here the Home Page is placed first, then the About Us Page and then Contact Us Page. In this example we will make three Separate Pages Home, About and Contact Us page.Įach Page is contained inside a separate. This Page Container will contain another, which contains all the pages is separate. We will have to include jQuery Ui inside the tags.įirst we will create the Page Container Div. All plugins are tested for compatibility in IE 6.0+, Firefox 3+, Safari 3.1+, Opera 9.6+, and Google Chrome.īoth versions can be downloaded from › ‹. JQuery UI provides a comprehensive set of core interaction plugins, UI widgets and visual effects that use a jQuery-style, event-driven architecture and a focus on web standards, accessiblity, flexible styling, and user-friendly design.
PARALLAX MENU HTML DOWNLOAD
Set the value of src attribute to “” Download & Include jQuery UI This can be done by adding src attribute to the script tag. There’s an alternate way to include jQuery Library on the webpage without downloading jQuery file. We will have to include jQuery inside the tags. Two versions of jQuery are available for downloading: one minified and one uncompressed (for debugging or reading).īoth versions can be downloaded from › ‹. JQuery is a lightweight “write less, do more” JavaScript library. JQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development. → Customize the jQuery Code for the Parallax Scrolling Effect.

→ Style the Pages and Navigational Buttons. This is a growing trend now in website design with many single page websites using this technique to create interesting and interactive websites.Įstimated Completion Time » 20 minutes Steps to Create the Parallax Scrolling
PARALLAX MENU HTML HOW TO
In this tutorial you will learn how to create a parallax scrolling effect using CSS & jQuery.
