Jaanus
Jaanus

Reputation: 17866

How to get calculated element width and height in YUI3?

jQuery has handy .height() and .width() utilities to get calculated displayed size of a DOM element. It also has .position() to get coordinates. In YUI3 Node, I see that there are .getX(), .getY() and .getXY() utilities to get position, but I do not see anything for size (or can't look).

What's a good way to get element height and width in YUI3?

Upvotes: 6

Views: 4392

Answers (1)

Tivac
Tivac

Reputation: 2573

getComputedStyle

.getComputedStyle("width")
.getComputedStyle("height")

Upvotes: 11

Related Questions