为什么我在JavaScript中出现语法错误?

0 javascript jquery jquery-plugins

<script type="text/javascript">
  $(document).ready(function(){
    $("a.grouped_elements").fancybox(
       'transitionIn' : 'elastic',
       'transitionOut' : 'elastic',
       'speedIn' : 600,
       'speedOut' : 200, 
       'overlayShow' : false );
  });
</script>
Run Code Online (Sandbox Code Playgroud)

我收到错误:missing ) after argument list在使用firefox 3.6.12的这部分代码.画廊仍然有效,但我得到了狐狸和IE的错误.虽然铬没有错误.

Nic*_*ver 8

你缺少的{,并}在你的选择对象要传递到.fancybox().

 $(document).ready(function(){
    $("a.grouped_elements").fancybox({
                                     ^ here
       'transitionIn' : 'elastic',
       'transitionOut' : 'elastic',
       'speedIn' : 600,
       'speedOut' : 200, 
       'overlayShow' : false 
    });
    ^ and here
 });
Run Code Online (Sandbox Code Playgroud)