我有一个关于 jquery 切换的问题。
好像不包括技能。
<section class="ResumeItem">
<header class="ResumeContentTitle" id="ResumeKnowledgeHeader">
<p>Professional Knowledge</p>
</header>
<section class="skills">
<header>
<h3>Strong Skills</h3>
</header>
<ul>
<li>PHP</li>
<li>jQuery</li>
<li>SQL</li>
<li>Ajax</li>
<li>HTML</li>
<li>CSS</li>
</ul>
</section>
<section id="ResumeKnowledge" class="ResumeContentText">
<ul>
<li>PHP – Expert Strong level. Worked with this technology for over a year.</li>
</ul>
</section>
</section>
JavaScript:
$(function(){
$('.ResumeContentTitle').click(function(){
var id = $(this).attr('id').split('Header');
$('#'+id[0]).toggle("slow");
});
});
这是一个例子:http: //jsfiddle.net/ohadpartuck/R2cEd/