$(".owl-cover-banner").owlCarousel('remove', SLIDENUMBER).owlCarousel('update');
如何从html代码中获取SLIDENUMBER而不考虑div的
class="owl-item cloned"
class="profilecoverimagebanner_26"
输出为1
class="profilecoverimagebanner_25"
id已作为
$(".profilecoverimagebanner_" + id)
这是我的HTML结构:
<div class="owl-stage-outer">
<div class="owl-stage" style="transition: all 0.25s ease 0s; width: 5910px; transform: translate3d(-2955px, 0px, 0px);">
<div class="owl-item cloned" style="width: 1182px;">
<div class="profilecoverimagebanner_26">
<img class="img-fluid-cover" src="/storage//5/cover/1567847731_5d737533869b0_thumbnail.jpg" alt="">
</div>
</div>
<div class="owl-item cloned" style="width: 1182px;">
<div class="profilecoverimagebanner_26">
<img class="img-fluid-cover" src="/storage//5/cover/1567847731_5d737533869b0_thumbnail.jpg" alt="">
</div>
</div>
<div class="owl-item" style="width: 1182px;">
<div class="profilecoverimagebanner_26">
<img class="img-fluid-cover" src="/storage//5/cover/1567847731_5d737533869b0_thumbnail.jpg" alt="">
</div>
</div>
<div class="owl-item" style="width: 1182px;">
<div class="profilecoverimagebanner_25">
<img class="img-fluid-cover" src="/storage//5/cover/1567847731_5d737533869b0_thumbnail.jpg" alt="">
</div>
</div>
<div class="owl-item cloned active center" style="width: 1182px;">
<div class="profilecoverimagebanner_26">
<img class="img-fluid-cover" src="/storage//5/cover/1567847731_5d737533869b0_thumbnail.jpg" alt="">
</div>
</div>
<div class="owl-item cloned active" style="width: 1182px;">
<div class="profilecoverimagebanner_26">
<img class="img-fluid-cover" src="/storage//5/cover/1567847731_5d737533869b0_thumbnail.jpg" alt="">
</div>
</div>
</div>
</div>