Link doesn't work for me

0 daniel ophir · September 30, 2015
That's is the navigation bar:
<div id="new_div">
<nav id="nav">
<ul>
<div id="link1">
<li><a href= "#aboutme" class="button">About me</a></li>
</div>
<div id="link4">
<li><a href= "#contactinfo" class="button">Contact info</a></li>
</div>
</div>
</ul>
</nav>

that's the actual section same html doc:
<section id="main_section">
<div id="aboutme" style="visibility: hidden;">
<article>
<header><h1>About me</h1></header>
<p>blablabla</p>
<footer><p id="signature">Made by Daniel.O.</p></footer>
</article>
</div>
<div id="contactinfo"  style="visibility: hidden; display: none; ..">
<article>
<header><h1>Contact info</h1></header>
<p>blablabla</p>
<footer><p id="signature">Made by Daniel.O.</p></footer>
</article>
</div>
</section>

Jquery connected file
$(document).ready(function(){
   var aboutArticle = $("article#aboutme"),
       contactArticle = $("article#contactInfo"),
       aboutButton = $("a[href='#aboutme']"),
       contactButton =$("a[href='#contactinfo']");

   // Hiding both articles at first
   aboutArticle.slideUp(400);   // set the speed you like , e.g 400==0.4s
   contactArticle.slideUp(400);

   aboutButton.on("click",function(){
     contactArticle.slideUp(400);
     aboutArticle.slideDown(400);
   });

   contactButton.on("click",function(){
     aboutArticle.slideUp(400);
     contactArticle.slideDown(400);
   });
});

to link won't go to the article i don't understand what's is wrong here

Post a Reply

Replies

Oldest  Newest  Rating
0 daniel ophir · October 3, 2015
im trying to create a situation when you press on one of the links from the navagation bar to your left < the page doesn't change but the article in the center does.
for example:
i have a pattern means the owl page : css tags navagation bar everything. I would like to keep that pattern only changing one aspect of text meaning the article inside the section i want the article to come up only when pressing the related link also i want it to be in the same section so it will come up with the same css attributes.

I need help i dont know about the jquery code but the html code stayed so far I couldn't figure it out
  • 1

HTML / CSS / Web Design

107,091 followers
About

Discuss, share, ask, learn and teach HTML5 and CSS3.

Links
Moderators