插件照亮 0.7 与 jQuery 1.9.1 或 jQuery-UI 1.10.3 不兼容 ->类型错误:$.css(...) 未定义 [英] plugin illuminate 0.7 incompatible to jQuery 1.9.1 or jQuery-UI 1.10.3 -> TypeError: $.css(...) is undefined

查看:14
本文介绍了插件照亮 0.7 与 jQuery 1.9.1 或 jQuery-UI 1.10.3 不兼容 ->类型错误:$.css(...) 未定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

插件jquery.illuminate.0.7 工作在 chrome 30、firefox 22 和 IE 10 中.它使用

The plugin jquery.illuminate.0.7 works in chrome 30, firefox 22 and IE 10. It uses

  • jquery_1.6.1.min.js
  • jquery-ui_1.8.13.min.js
  • jquery.illuminate.0.7.js

但是更改 jQuery 和 jQuery-UI 的版本 导致照明插件的演示仅适用于 chrome 30.演示使用

But changing the version of jQuery and jQuery-UI the causes the demo of the illuminate plugin to only work in chrome 30. The demo uses

  • jquery_1.9.1.js 和
  • jquery-ui_1.10.3.js
  • jquery.illuminate.0.7.js

在 Firefox 22 中会导致以下错误:

In firefox 22 it causes the following error:

TypeError: $.css(...) is undefined pointing to jquery.illuminate.0.7.js:223 

HTML 和 js 代码

<script>
window.onload = function(){
    $("#illuminate").illuminate({
        'intensity': '0.3',
        'color': '#98cb00',
        'blink': 'true',
        'blinkSpeed': '1200',
        'outerGlow': 'true',
        'outerGlowSize': '30px',
        'outerGlowColor': '#98cb00'
    });
};
</script>

相关的html只是按钮

The relevant html is only the button

<button type="submit" class="btn" id="illuminate" >submit</button>

我尝试了什么

我查看了Illumination插件的源代码,看看错误发生在哪里.$.cssHooks.boxShadowBlur 方法包含这个js:

$.cssHooks.boxShadowBlur = {
     get: function ( elem, computed, extra ) {
        return $.css(elem, support.boxShadow).split(rWhitespace)[5];
     },
     set: function( elem, value ) {     
              elem.style[ support.boxShadow ] = 
                 insert_into($.css(elem, support.boxShadow), value, 5);                
     }
};

jquery的github页面还是包含匹配函数(见第 111 行):

The github page of jquery still contains a matching function (see line 111):

jQuery.fn.extend({
  css: function( name, value ) { ....

我的问题

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆