我正在使用循环插件运行的幻灯片,这会应用position:absolute
个幻灯片。
所以我可以通过以下方式在页面加载时更改此内容:
jQuery(window).on('load', function()
{ $('.views_slideshow_cycle_slide').css('position', 'relative', 'important');
$('.views_slideshow_cycle_hidden').css('position', 'relative', 'important');
});
但是,在加载幻灯片并将类从views_slideshow_cycle_hidden
更改为views_slideshow_cycle_slide
时,会覆盖此内容。
循环/视图HTML生成:
<div class="views_slideshow_cycle_slide views_slideshow_slide views-row-1 views-row-odd" id="views_slideshow_cycle_div_Diapo_illustration-block_1_0" style="position: absolute; top: 0px; left: 0px; z-index: 2; opacity: 1; display: block;">
<div class="views-row views-row-0 views-row-first views-row-odd">
<div class="views-field views-field-field-illus-lycee-fid"> <span class="field-content"><img src="//10.100.3.90:3000/sites/all/media/imagecache/MG_illustration_170x310/diapo_lycee/2017/22/abstract-h-c-1107-1142-8.jpg" alt="Lycée Marie Gasquet" title="Lycée Marie Gasquet" class="imagecache imagecache-MG_illustration_170x310 imagecache-default imagecache-MG_illustration_170x310_default"></span> </div></div>
</div>
如何在另一个onload
不同的jquery事件上执行此操作?
在文档就绪事件上,效果不佳。
感谢