jQuery UI autocomplete works in Firefox but not in IE

蓝咒 提交于 2019-12-05 12:37:32

If I understand this right the line you refer to seems to be the line 4618 in jquery.1.4.2.js in the style function. Which can only mean that the Autocompleter plugin tries to set a style value that IE8 doesn't understand or doesn't allow to be accessed/changed in this way.

style[ name ] = value; //style == elem.style from the passed in element

I have the exact same error on the exact same line, but for a completely different deal. That is, I'm not doing anything having to do with auto-complete; rather, mine occurs because I'm trying this in jQuery...

$(this).css('background', 'rgba(64,255,64,.4)');

Which jQuery tries to do...

style [ 'background' ] = 'rgba(64,255,64,.4)';

And it fails, of course, because rgba is not a supported CSS value for Internet Explorer. So you're not alone on this one, but in my case I was just doing it wrong. The appropriate jQuery syntax is this...

$(this).css({backgroundColor: '#40ff40', opacity: .4});

Here's my source...

http://www.cjs.me.uk/blog/?p=238

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!