简体   繁体   English

jQuery滑块和IE6问题

[英]jQuery slider and IE6 Issues

I'm having a few issues with our old friend IE6. 我和我们的老朋友IE6有一些问题。 The site I'm working on is for a public sector client so it has to support IE6. 我正在研究的网站是针对公共部门的客户,所以它必须支持IE6。 The slider is fine in IE7+, Firefox, Safari and Chrome. 在IE7 +,Firefox,Safari和Chrome中滑块都很好。 I've tried everything that I can think of but I'm drawing a blank! 我已经尝试了所有我能想到的东西,但我画的是空白! Can you help? 你能帮我吗?

IE6 on a PC. 在PC上的IE6。 IE6 Screen grab http://citywest.bangtest.co.uk/stackoverflow/ie6.png IE6屏幕抓取http://citywest.bangtest.co.uk/stackoverflow/ie6.png

Chrome on a Mac Chrome on a Mac http://citywest.bangtest.co.uk/stackoverflow/chrome.png Mac上的 Chrome Chrome浏览器http://citywest.bangtest.co.uk/stackoverflow/chrome.png

I can't help but jump to the old "IE6 hasLayout" issue (since this appears to be a visual bug). 我忍不住跳到旧的“IE6 hasLayout”问题(因为这似乎是一个视觉错误)。 It might be worth your time to check your elements to assure that they have "hasLayout" - most rendering problems I've run into for IE6 that "make no sense" relate back to this property. 你可能值得花时间检查你的元素,以确保它们有“hasLayout” - 我遇到的大多数渲染问题,IE6“没有意义”与这个属性有关。

http://www.satzansatz.de/cssd/onhavinglayout.html http://www.satzansatz.de/cssd/onhavinglayout.html

A quick and dirty way to see if the problem relates to "hasLayout" is to add the non-standard, IE proprietary CSS property "zoom: 1;". 查看问题是否与“hasLayout”相关的快速而又脏的方法是添加非标准的IE专有CSS属性“zoom:1;”。 This will NOT validate, but it will grant "hasLayout" to any element to which it's applied. 这将不会验证,但它会将“hasLayout”授予其应用的任何元素。 Just put it on all the elements involved, and it might fix the issue... Then, armed with the awful solution, you can figure out how to make it validate :) 只需将其放在所涉及的所有元素上,它就可以解决问题......然后,凭借可怕的解决方案,您可以弄清楚如何使其验证:)

/* in your css */
.my_box {
    zoom: 1;
}

I'm seeing an error on the page with ie 6, dubugging the page with the ms script editor leads me to this file: 我在页面上看到一个错误,即6,用ms脚本编辑器对页面进行调整导致我到这个文件:

http://citywest.bangtest.co.uk/sites/all/themes/citywest/inc/js/jquery.custom.js http://citywest.bangtest.co.uk/sites/all/themes/citywest/inc/js/jquery.custom.js

and this line: 这一行:

$().newsTicker(options);

I can also tell you that multiple $(document).ready( lines within the same js document is not necessary within that file. You should consolidate those statements. 我还可以告诉你多个$(document).ready(同一个js文档中的行在该文件中是不必要的。你应该合并这些语句。

Ie6 doesn't provide a great way to debug, but since ie6 is saying you've got an error on that line, it's good place to start looking. Ie6没有提供一种很好的调试方法,但是因为ie6说你在这一行上有错误,所以它是开始寻找的好地方。

Don't code for IE 6. It's an obsolete browser and the last operating system it shipped with was Windows XP. 不要为IE 6编码。它是一个过时的浏览器,它附带的最后一个操作系统是Windows XP。 Some of the newer code just doesn't work well with IE6. 一些较新的代码与IE6不兼容。 If you do get it to work, you have to create hacks for it to display code correctly and spend numerous hours doing so. 如果你确实让它工作,你必须为它创建hacks以正确显示代码并花费数小时这样做。 Code for IE8 and Firefox3+, use javascript to detect the browser version and a message to go update their browser. 代码为IE8和Firefox3 +,使用javascript检测浏览器版本,并使用消息更新浏览器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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