Hi all,
I have a menu which dynamicaly load anchors on page depending of the database records, so when I click on one menu button I have for example 5 anchors on page, and when I click on second menu button I have 12 anchors.
The anchors have diferent height depending on how many lines of text they have, and I need to calculate the sum of the all anchors loaded on page, to make the scrolling page, cause some of theme will be hidding behind some div.
I did something like this :
Code: Select all
$steps = $(".data a").length;
$h = $(".div a").height;
$obj = $(".data a");
$(".data a").each(function() {
$height = $(".data a").height();
});
return $height;
I need to calculate the sum of the haight of all anchors on page.....
pickle | Please use [ code=php ], [ code=text ], etc tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: