jquery缺失{属性后

时间:2010-06-26 18:33:31

标签: jquery

我一直收到错误,在以下代码的属性之后丢失{。

    <script type="text/javascript">
        $(function(){
            var storage = new Array("hi","h2","hi3","h4","h5","6","7","hi8","hi9","10");
            // Slider
            $('#slider').slider({
                max: 10,
                orientation: 'vertical'
                slide: function(e,ui) {
                    $('#storage').html(storage[ui.value-1]);
                }
            });
        });
    </script>

1 个答案:

答案 0 :(得分:4)

你错过了一个逗号。

替换:

orientation: 'vertical'

使用

orientation: 'vertical',