[英]Why am I getting the error Missing ; before statement
I have some very simple code but I am getting the aforementioned error, any ideas why?我有一些非常简单的代码,但出现上述错误,有什么想法吗?
Here is the code:这是代码:
function changeSlides(new_slide) {
${'#app_dev'}.toggle('blind', 500);
}
Change ${'#app_dev'}
to $('#app_dev')
将
${'#app_dev'}
更改为$('#app_dev')
$
is a function and needs to be called like one. $
是一个 function 并且需要像一个一样调用。
Use parentheses instead of curly brackets for the $ method: $ 方法使用括号而不是大括号:
$("#app_dev").toggle("blind", 500);
You need to use paras你需要使用 paras
function changeSlides(new_slide) {
$('#app_dev').toggle('blind', 500); //switch { to )
}
The jquery selector function uses parentheses ()
not curly brackets {}
jquery 选择器 function 使用括号
()
而不是大括号{}
function changeSlides(new_slide) {
$('#app_dev').toggle('blind', 500);
}
Wrong brackets, it should be: $('#app_dev')
括号错误,应该是:
$('#app_dev')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.