로드시 4 개의 DIV가 있습니다. 3 개의 숨김이 필요합니다 .. 클릭 (탭 링크)에서 해당 탭의 내용을 표시하고 싶습니다. 나머지를 숨 깁니다. 나는 그것의 작동하지 않는 = (Jquery DIV .hide() doesnt work
http://codepen.io/anon/pen/AafIH
<script type='text/javascript' src='http://mimerchant.com/wp-includes/js/jquery/jquery.js'></script>
<div class="tabnav">
<ul class="fancyNav">
<li id="news"><a href="#creditcard" id="creditcard_link">Credit Card Processing</a>
</li>
<li id="about"><a href="#atm" id="atm_link">ATM Processing</a>
</li>
<li id="services"><a href="#giftcard" id="giftcard_link">Gift Card Program</a>
</li>
<li id="contact"><a href="#check" id="check_link">Check Guarantee</a>
</li>
</ul>
</div>
<div class="tabcontent">
<div id="creditcard">
<div id="textbox">
<h3>Credit Card Processing</h3>
<p>Some Text here about what this credit card tab is about</p>
<h3>Low Rates</h3>
<p>About Low Rates</h3>
</div>
</div>
<div id="atm">
<div id="textbox">
<h3>ATM Processing</h3>
<p>Some text here about the ATM services</p>
<h3>Another Title</h3>
<p>Some text</p>
</div>
</div>
<div id="giftcard">
<div id="textbox">
<h3>Gift Card Program</h3>
<p>Something about gift cards</p>
</div>
</div>
<div id="check">
<div id="textbox">
<h3>Check Guarantee</h3>
<p>Something About Checks</p>
</div>
</div>
</div>
고유 한 ID 여야합니다. 자바 스크립트는 어 딨지? –
'$는 함수가 아닙니다.'라는 메시지가 표시되어 jQuery가로드되기 전에이 JavaScript가 실행되고 있다고 생각하게되지만, 코덱에 익숙하지 않은 것 같습니다. –
코드에는 아무런 문제가 없습니다. Codepen.io는 단순히 jquery를 예상대로 포함하지 않습니다. JS 구성 화면에서 jquery를 선택하면 원하는 방식으로 작동합니다. –