开发者

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 ch开发者_StackOverflowangeSlides(new_slide) {

    ${'#app_dev'}.toggle('blind', 500);

}


Change ${'#app_dev'} to $('#app_dev')

$ is a function and needs to be called like one.


Use parentheses instead of curly brackets for the $ method:

$("#app_dev").toggle("blind", 500);


You need to use paras

function changeSlides(new_slide) {

    $('#app_dev').toggle('blind', 500); //switch { to )

}


The jquery selector function uses parentheses () not curly brackets {}

function changeSlides(new_slide) {

    $('#app_dev').toggle('blind', 500);

}


Wrong brackets, it should be: $('#app_dev')

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜