开发者

What could be causing Javascript to stop working in IE in Strict mode [closed]

It's difficult to 开发者_JAVA技巧tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I'm trying to debug my jQuery plugin and it worked fine in IE until I added <!doctype html>. It still works fine in all browsers except IE sigh (tested in 6,7,8). What sort of thing could be causing this?

here is the page: http://liime.net/projects/liimeBar/demo.html


Your condition in constructScrollers() window.innerHeight < $('body')[0].scrollHeight is false, bacause both values are the same in IE8. So no scrollers are created

Do some research in jQuery that you find the proper function how to get the heights you want to test.

You have much code in it, that could be better if you used more jQuery functions, not just the selectors.

--edit try this instead $(window).height() < $('body').height()

P.S.: By this script you can only make a scrollbar for the body, because you hard coded the body. try $(this) instead, which is the object you called your liimebar() function with and don't use ids on liimebar_buttons, ..bar etc, but classes, so you could possibly have more than on scrollbar.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜