我有一个奇怪的问题:
查看此页面我刚刚上传: http://www.gloskincare.be/instituten.html
有一个包含所有选项的下拉选项菜单:(检查firefox或safari)
当人们选择某个选项时,所有其他实例都会隐藏。
HTML 这是选项html:
<select id="stadlijst">
<option value="javascript:history.go(0)">Selecteer een provincie</option>
<option value="javascript:history.go(0)">Toon alle provincies</option>
<option value="antwerpen">Antwerpen</option>
<option value="limburg">Limburg</option>
<option value="oost-vlaanderen">Oost-Vlaanderen</option>
<option value="west-vlaanderen">West-Vlaanderen</option>
<option value="vlaams-brabant">Vlaams-Brabant</option>
<option value="henegouwen">Henegouwen</option>
<option value="luik">Luik</option>
<option value="luxemburg">Luxemburg</option>
<option value="namen">Namen</option>
<option value="waals-brabant">Waals-Brabant</option>
</select>
这是另一部分
<div class="lijst userstyle1 row">
<div class="stad-antwerpen adcont col-sm-6 col-md-3 col-lg-2">
<h3>Loox4Life</h3>
<h5>
Verlatstraat 3<br>
2000 Antwerpen<br><br>
+32 495 78 11 50<br>
<a href="http://www.loox4life.com">www.loox4life.com</a></h5>
</div>
<div class="stad-vlaams-brabant adcont col-sm-6 col-md-3 col-lg-2">
<h3>Kim Skincare</h3>
<h5>Kleine Mechelsebaan 16<br>
3200 Aarschot<br><br>
+32 498 21 80 40<br>
<a href="http://www.kimvangramberen.be">www.kimvangramberen.be</a></h5>
</div>
</div>
JQUERY
$(document).ready(function () {
$('#stadlijst').on('change', function () {
$('.lijst div').show().not(".stad-" + this.value).hide();
});
});
答案 0 :(得分:0)
我想我知道它是什么。您是否在Chrome中使用AdBlock? AdBlock隐藏了类adcont
的div。停用AdBlock并重试。