简体   繁体   中英

Expected identifier, string, or number. (Javascript)

I am having issues compiling some javascript, And it keeps saying Expected identifier, string or number on the 3rd character of the line },100,'linear',function(){

Is there something i'm missing, i think i formated it different but i can't find out where.

firstCard_clone.animate({
    'top': firstCard_offset_2.top,
    'left': firstCard_offset_2.left,
  },100,'linear',function(){
    firstCard_clone.remove();
    $firstDeck.children().children().css('visibility','visible');
    done_fc();
  });

You have a trailing comma:

firstCard_clone.animate({
    'top': firstCard_offset_2.top,
    'left': firstCard_offset_2.left,  // here
}

which means it expects another identifier in the object literal.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM