我试图模拟单击<li>
. <ul>
这是html。
<ul class="product-thumbs clearfix mCustomScrollbar _mCS_1">
<div class="mCustomScrollBox mCSB_horizontal" id="mCSB_1" style="position:relative; height:100%; overflow:hidden; max-width:100%;">
<div class="mCSB_container mCS_no_scrollbar" style="position: relative; left: 0px; width: 195px;">
<li data-full-image="/images/store_logos/e49c796f8740723601503849db95893f6592526a.jpeg" data-large-image="/images/store_logos/e49c796f8740723601503849db95893f6592526a.jpeg" class="active">
<img src="/images/store_logos/e49c796f8740723601503849db95893f6592526a.jpeg" alt="">
</li>
<li data-full-image="/images/store_logos/05838eeaff6014af6206de1cc7a60d7335e61dc1.jpeg" data-large-image="/images/store_logos/05838eeaff6014af6206de1cc7a60d7335e61dc1.jpeg" class="">
<img src="/images/store_logos/05838eeaff6014af6206de1cc7a60d7335e61dc1.jpeg" alt="">
</li>
</div>
<div class="mCSB_scrollTools" style="position: absolute; display: none;">
<div class="mCSB_draggerContainer" style="position:relative;">
<div class="mCSB_dragger" style="position: absolute; left: 0px;">
<div class="mCSB_dragger_bar" style="position:relative;"></div>
</div>
<div class="mCSB_draggerRail"></div>
</div>
</div>
</div>
</ul>
这是我的 jQuery:
$(".product-thumbs > li:first").trigger('click');
为什么这不起作用?