gpt4 book ai didi

javascript - DIV结构的JS

转载 作者:行者123 更新时间:2023-11-28 19:24:02 26 4
gpt4 key购买 nike

我使用以下代码来调用上述 DIV #lightGallery 的 JS 函数

 $("#lightGallery").lightGallery({
thumbnail: false,
});

我需要修改 JS 代码以使函数可以为任何 #DIV+num 调用,例如 #lightGallery1、#lightGallery2、...等

最佳答案

$('[id^="lightGallery"]').lightGallery({
thumbnail: false,
});

关于javascript - DIV结构的JS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28225513/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com