Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想为 jQuery 创建一个扩展,例如$.ajax()或$.extend()但不同于$("selector").css().
$.ajax()
$.extend()
$("selector").css()
所以我可以像这样调用我的自定义 jQuery 函数:$.myCustomFunction("args");
$.myCustomFunction("args");
只需将其分配给jQuery对象。
jQuery
jQuery.myCustomFunction = function() {};