jQuery on IE8, error: Object doesn't support this property or method

后端 未结 2 1144
不思量自难忘°
不思量自难忘° 2021-01-19 19:31

I have jQuery for a WordPress theme I\'m building. I\'ve given up for now on testing IE6 and IE7 (layouting hell), and now I\'m testing it using IE8. Every time I click on a

2条回答
  •  既然无缘
    2021-01-19 19:55

    I just came upon the same problem. Instead of altering jQuery (yes, I realize it's a decent patch in the short term), contact the author of the Wordpress plugin/theme or Wordpress themselves if necessary. They can fix the problem by using string values instead of numeric values when they call .animate() or other effects. For example:

    $(this).animate({opacity:0.5},500);
    

    Should be:

    $(this).animate({opacity:"0.5"},"500");
    

    In reality, jQuery should address the problem to remain cross-browser, but in the meantime it's a solution.

提交回复
热议问题