Logo 
Search:

Asp.net Answers

Ask Question   UnAnswered
Home » Forum » Asp.net       RSS Feeds
  Question Asked By: Alex Meyer   on Dec 09 In Asp.net Category.

  
Question Answered By: Evelyn Hughes   on Dec 09

go thru all parents... like this (works on IE as well as on NN):


function _elementTop(el)
{
var et = 0;
while (el)
{
et += el.offsetTop;
el = el.offsetParent;
}
return et;
}

function _elementLeft(el)
{
var et = 0;
while (el)
{
et += el.offsetLeft;
el = el.offsetParent;
}
return et;
}

both functions return pixel number top and left respectively.

Share: 

 

This Question has 7 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on jscript Or get search suggestion and latest updates.

Related Topics:

Tagged: