gpt4 book ai didi

javascript - 缺少 : after property ID

转载 作者:可可西里 更新时间:2023-11-01 02:20:06 26 4
gpt4 key购买 nike

我不明白我在这里做错了什么...第 3 行报告丢失:在属性 ID 之后

$(document).ready(function() {

$('#imagegallery img').each(function({$(this).css({ width: '100%'});});

$('#imagegallery').cycle({
timeout: 0,
fx: 'scrollHorz',
width: '100%',
height: 'auto',
next: '.next',
prev: '.prev'
});



$("#imagegallery").touchwipe({
wipeLeft: function() {
$("#imagegallery").cycle("next");
},
wipeRight: function() {
$("#imagegallery").cycle("prev");
}
});
});

最佳答案

问题出在这一行:

$('#imagegallery img').each(function({$(this).css({ width: '100%'});});

应该是:

    // missing ) --------------------v
$('#imagegallery img').each(function(){$(this).css({ width: '100%'});});

虽然你可以这样缩短它:

$('#imagegallery img').css({ width: '100%'});

关于javascript - 缺少 : after property ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4026271/

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