重新调整大小不会按时引入滚动条

时间:2013-03-25 11:03:55

标签: jquery jscrollpane

我不明白为什么我的垂直滚动条没有显示,直到我将容器调整为小于其高度减去horz滚动条高度....

我做错了什么或这是一个错误?

由于

I would expect to see a vertical scrollbar now!

Now the vertical scroll is introduced....!!

使用此代码:

<script>

        $(document).ready(function () {

            var settings = {
                showArrows: false
            };

            $('.myContainer').jScrollPane(settings);

            var api = $('.myContainer').data('jsp');

            var throttleTimeout;
            $(window).bind(
                'resize',
                function () {
                    if ($.browser.msie) {
                        // IE fires multiple resize events while you are dragging the browser window which
                        // causes it to crash if you try to update the scrollpane on every one. So we need
                        // to throttle it to fire a maximum of once every 50 milliseconds...
                        if (!throttleTimeout) {
                            throttleTimeout = setTimeout(
                                function () {
                                    api.reinitialise();
                                    throttleTimeout = null;
                                },
                                50
                            );
                        }
                    } else {
                        api.reinitialise();
                    }
                }
            );

        });

    </script>

0 个答案:

没有答案