我正在尝试编写一个插件,将扩展jQuery中现有的函数,例如:
(function($)
{
$.fn.css = function()
{
// stuff I will be extending
// that doesn't affect/change
// the way .css() works
};
})(jQuery);
我只需要扩展.css()
函数的一些位。请原谅我的问题,我在考虑PHP类,因为您可以className extend existingClass
,所以我想知道是否可以扩展jQuery函数。