|
-
Sep 2nd, 2010, 12:11 PM
#1
Thread Starter
Hyperactive Member
Ascertain width of newly injected DOM element
Losing it.
On a mouseover event, I'm inserting a new DOM element that contains child elements.
Based on the content that is injected, there are some positioning tweaks that need to take place.
The problem:
After the element is injected, I cannot get a calculated width. (I always get width:0)
I CAN however, get the width of the new element AFTER the current function has finished executing. What I need is to be able to get the width of the new element before terminating the function that is fired on the mouseover event.
Thoughts?
-
Sep 2nd, 2010, 01:05 PM
#2
Re: Ascertain width of newly injected DOM element
tried element.offsetWidth? it's not part of the W3C specification, but it could get you what you want.
-
Sep 8th, 2010, 07:41 PM
#3
Re: Ascertain width of newly injected DOM element
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|