정말 간단해야하는 문제가 있습니다. 기본적으로 오른쪽 수직 메뉴가 있는데, 여기서 클라이언트는 페이지가 특정 지점으로 크기가 조정될 때 스크롤 막대를 포함하고자합니다. 내가 가진페이지 크기를 조정할 때 세로 메뉴에 스크롤 바를 표시하십시오.
<div id="hamburger_menu_parent">
<span id="toggle-menu"></span> // User clicks this to open the hamburger menu
<div class="mobile-navigation open"> // The "open" class is appended with
// jQuery when menu is clicked.
<div id="navigation">
<ul style="margin-top: 25px;">
<li>List item </li>
<li>List item </li>
<li>List item </li>
<li>List item </li>
<li>List item </li>
</ul>
</div>
</div>
</div>
그리고 jQuery를이가 (다른 웹 사이트에 그것을 아래로 사냥 및 부품 관련 있었다 자신의 코드에서 파악했다)이다
function ScrollMenuMobile(){
$('.mobile-navigation.open').css('height', $(window.height() + 'px'));
}
$(document).ready(ScrollMenuMobile);
$(document).resize(ScrollMenuMobile);
은에 그것을 얻을 수없는 것 작업. CSS의 속성이 .mobile-navigation.open 내에 입력하지 않습니다 내가 방화범의 오류 얻을 :
ReferenceError: $ is not defined
$(document).ready(ScrollMenuMobile);
당신은 햄버거 메뉴를 클릭하고 여기를 확인 할 수 있습니다 :
www.prometrika.com/newPMK
시간을 검색하고 모든 것을 시도했습니다. Jsfiddles는 내가 뭘 잘못하고 있는지 지적하고 있습니다.