중복

2012-08-14 2 views
0

내가 클릭에를 복제 할 메뉴 요소 아래로 두 번째 드롭에 자바 스크립트 효과 드롭 다운 '연락하기'메뉴 요소 내가 html 코드를 복제 한중복

http://www.dawaf.co.uk/jj/

'바이오'메뉴 요소에 영향을 드롭 다운 나는 CSS

내가 같은 EF를 얻기 위해 편집해야 자바 스크립트 무엇인지 확실하지 않다 중복 한

<!-- contact --> 
<section id="contact"> 
    <!-- container --> 
    <div class="container"> 
       <p>Creative Consultant/Stylist<br /><br /><a href="mailto:[email protected]">[email protected]</a><br /> 
       +44(0) 7983 572330</p> 

    </div> 
    <!-- .container --> 

</section> 
<!-- .contact --> 

<!-- bio --> 
<section id="bio"> 
    <!-- container --> 
    <div class="container"> 
       <p>Testing this shows up</p> 

    </div> 
    <!-- .container --> 

</section> 
<!-- .bio --> 

과 : header.php에서 그래서처럼 "바이오"href가 확인

/* Show the portfolio 
    ------------------------------------------------- */ 

    $('#portfolio-catcher').click(function() { 

     $('h1 a').trigger('click'); 

     return false; 

    }); 

    $('a[href="#portfolio"]').click(function() { 

     // hide contact 
     $('#contact').stop().slideUp({ 
      duration: 250, 
      easing: 'easeInOutCubic' 
     }); 

     // remove the iframe content (for vimeo videos) 

     $('iframe').remove(); 

     hattie.showPortfolio(); 

     return false; 


    }); 

    /* Contact section click 
     ------------------------------------------------- */ 
     $('a[href="#contact"]').click(function() { 

      // hide slideshow whatever 
      $('#slideshow').stop().slideUp({ 
       duration: 300, 
       easing: 'easeInOutCubic' 
      });  

      // show contact 
      $('#contact').stop().slideDown({ 
       duration: 300, 
       easing: 'easeInOutCubic' 
      }); 

      hattie.showPortfolio(); 

      return false; 

    }); 

    /* Launching a project 
    ------------------------------------------------- */ 

    $('hgroup').click(function() { 

     // scroll to top 
     $.scrollTo(0, 250); 

     $hgroup  = $(this); 
     // hide contact 

     if ($('#contact').is(':visible')) { 

      $('#contact').stop().slideUp({ 
       duration: 250, 
       easing: 'easeInOutCubic' 
      }); 
     } 

     // show the loading gif in the container 
     $('#slideshow-container').html('<div class="loading"><img src="/assets/img/loading.gif" alt="loading"/></div>'); 

     $('section#work').stop().animate({ 
      'margin-top' : '+=' +($(window).height() - 55) + 'px' 
     }, 700, 'easeInOutCubic', function() { 

      // load the project into the slideshow container div 
      $('#slideshow-container').load('' + $hgroup.attr('data-project'), function() { 
       // bind slideshow 
        slideshow.render(); 
        $('section#work').css('margin-top', '0px'); 
      }); 

     }); 

     return false; 

    }); 

}, 

this.folioLinkShow = function() { 

    if ($('.slide').length > 1) { 


     $('#portfolio-catcher').hover(function() { 

      $('nav#show-projects div').slideDown(200); 


     }, function() { 

      $('nav#show-projects div').slideUp(200); 

     }); 


    } else { 

     $('nav#show-projects').unbind(); 

    } 
}, 

this.loadImages  = function() { 

답변

0

을 : script.js에 fect,

#bio 그런 다음 자바 스크립트에 이것을 추가 (이 접촉 클릭으로 똑같은 일을 할 것입니다 해야 할 일 :

/* Contact section click ------------------------------------------------- */ 
$('a[href="#contact"]').click(function() { 
    // hide bio 
    if ($('#bio').is(':visible')) { 
     $('#bio').stop().slideUp({ 
      duration: 250, 
      easing: 'easeInOutCubic' 
     }); 
    } 
    // hide slideshow whatever 

     $('#slideshow').stop().slideUp({ 
      duration: 300, 
      easing: 'easeInOutCubic' 
     });  

     // show contact 
     $('#contact').stop().slideDown({ 
      duration: 300, 
      easing: 'easeInOutCubic' 
     }); 

     hattie.showPortfolio(); 

     return false; 

}); 

/* Bio section click ------------------------------------------------- */ 
$('a[href="#bio"]').click(function() { 
    // hide contact 
    if ($('#contact').is(':visible')) { 
     $('#contact').stop().slideUp({ 
      duration: 250, 
      easing: 'easeInOutCubic' 
     }); 
    } 

    // hide slideshow whatever 
    $('#slideshow').stop().slideUp({ 
     duration: 300, 
     easing: 'easeInOutCubic' 
    });  

    // show contact 
    $('#bio').stop().slideDown({ 
     duration: 300, 
     easing: 'easeInOutCubic' 
    }); 

    hattie.showPortfolio(); 

    return false; 

}); 
+0

감사합니다. '연락처'와 '바이오'사이를 건너 뛰면 텍스트가 다른 텍스트 위에 나타납니다. '접촉'과 '포트폴리오'사이를 오가는 경우이 작업을 중단하고 같은 방식으로 작업 할 수 있습니까? – user1096057

+0

기본적으로 연락처 섹션을 숨기려면 내 대답을 편집했습니다. 그렇게해야합니다. –

+0

고맙습니다. 이것은 '접촉'에서 '바이오'로 이동하지만 '바이오'에서 '접촉'으로 이동하지 않는 경우에만 작동하는 것 같습니다. 마지막 메시지에서 미안 해요. – user1096057