我有一个简单的切换事件,在桌面上一切正常,但是当我去电话时,我必须点击两次才能让它打开?
这是我所拥有的:
$(".service-m").click(function () {
$(this).next(".serviceinfo-m").toggle()
});
<a class="service-m">
Some Text
</a>
<div class="serviceinfo-m" style="display:none;">The First Line of Text.</div>
<a class="service-m">
Some Text
</a>
<div class="serviceinfo-m" style="display:none;">The First Line of Text.</div>
<a class="service-m">
Some Text
</a>
<div class="serviceinfo-m" style="display:none;">The Second Line of Text.</div>
<a class="service-m">
Some Text
</a>
<div class="serviceinfo-m" style="display:none;">The Third Line of Text.</div>
这里还有一个指向 jsfiddle http://jsfiddle.net/BrentRansom/tfM6E/1/的链接
谢谢