Question : Determine if an element is visible inside another element

Hi,

I have written some functions to scroll the items of a ul, the li are display inline so the scroller is horizontal. I want to stop scrolling if the last item in the list is visible.

The ul has overflow: hidden; to hide the items that are too far left or too far right.

I am able to tell if the first item is visible by checking it's left value against the amount of padding that I want there to be, that was the easy part

ctl is the id of the ul, passed to the function as a parameter

myfirst = $(ctl).find(":first");
if(parseInt(myfirst.css("left").substr(0,myfirst.css("left").length-2)) > 20)

mylast = $(ctl).find(":last");

I need to find a way to figure out if mylast is inside the visible part of the ul by at least mylast's width.

Answer : Determine if an element is visible inside another element

Yes it does but not much, ussualy around 1 - 5 % slower.  It has to do with the heat increasing the resistance in the wire and the physicical conductors (the basics).  But it should not be to noticable.  Sounds like you have another issue.  Sounds like you have T1's I would check the ussage report on each line by a website if they provided one or calling them.
Random Solutions  
 
programming4us programming4us