width() ⇒ number
width(value) ⇒ self
width(function(index, oldWidth){ … }) ⇒ self
获取对象集合中第一个元素的宽;或者设置对象集合中所有元素的宽。
$('#foo').width() // => 123 $(window).width() // => 768 (viewport width) $(document).width() // => 768
width() ⇒ number
width(value) ⇒ self
width(function(index, oldWidth){ … }) ⇒ self
获取对象集合中第一个元素的宽;或者设置对象集合中所有元素的宽。
$('#foo').width() // => 123 $(window).width() // => 768 (viewport width) $(document).width() // => 768