我正在使用Rocking Roling Menu插件作为我的菜单
和最新的jquery我改变了jquery-css-tranform.js中的代码
代码是
var $ = jQuery.noConflict();
(function ($) {
// Monkey patch jQuery 1.3.1+ css() method to support CSS 'transform'
// property uniformly across Webkit/Safari/Chrome and Firefox 3.5.
// 2009 Zachary Johnson www.zachstronaut.com
function getTransformProperty(element) {
// Try transform first for forward compatibility
var properties = ['transform', 'WebkitTransform', 'MozTransform'];
var p;
while (p = properties.shift()) {
if (typeof element.style[p] != 'undefined') {
return p;
}
}
// Default to transform also
return 'transform';
}
var proxied = $.fn.css;
$.fn.css = function (arg) {
// Find the correct browser specific property and setup the mapping using
// $.props which is used internally by jQuery.attr() when setting CSS
// properties via either the css(name, value) or css(properties) method.
// The problem with doing this once outside of css() method is that you
// need a DOM node to find the right CSS property, and there is some risk
// that somebody would call the css() method before body has loaded or any
// DOM-is-ready events have fired.
if
(
typeof $.attr['transform'] == 'undefined'
&&
(
arg == 'transform'
||
(
typeof arg == 'object'
&& typeof arg['transform'] != 'undefined'
)
)
) {
$.attr['transform'] = getTransformProperty(this.get(0));
}
// We force the property mapping here because jQuery.attr() does
// property mapping with jQuery.props when setting a CSS property,
// but curCSS() does *not* do property mapping when *getting* a
// CSS property. (It probably should since it manually does it
// for 'float' now anyway... but that'd require more testing.)
if (arg == 'transform') {
arg = $.attr['transform'];
}
return proxied.apply(this, arguments);
};
})(jQuery);
问题是,当我在铬中使用这个菜单时,它完全滚动
但是在Firefox中它没有滚动