开发者

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

开发者 https://www.devze.com 2023-02-10 16:09 出处:网络
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).

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

精彩评论

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