开发者

Where's the width() function in jQuery source?

Where's the width() function in jQu开发者_如何学编程ery source?


Search for jQuery.each([ "Height", "Width" ], function( i, name ) { in the code (around the end of the file).

The function is defined by the following statement, when name = "Width" in the outer function.

jQuery.fn[ type ] = function( size ) {


A convenient way to browse the jQuery source is using James Padolsey's interactive source viewer (unfortunately down as of this writing Update: Working again).


Actually the last function in the chain which is called for width calculation : getWidthOrHeight

At least in latest jquery code:

http://code.jquery.com/jquery-latest.js

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜