You're checking the css attribute : height
$container.find('div.listContainer ul').css('height');
If that's set to "auto", then that's what will be returned.
What you want is the ACTUAL height.
$container.find('div.listContainer ul').height();
L
simon wrote:
I have this hover function and outside this i am setting all the
variables etc everything works but when I test on IE yes that old one,
is gives me the wrong reading and hence does not function, so to get
over this I have to put in the variable within the hover function.
any ideas how to combat this.
main function:
var heigthOful = $container.find('div.listContainer ul').css
('height');
$('THEBUTTON').hover(function(){
//for eg if i alert the variable see below
alert(heigthOful);
});
for eg if i alert the variable on all other browsers I get say "1100"
while on IE i get "auto"
now if i set the variable within that function as
$('THEBUTTON').hover(function(){
var heigthOful = $container.find('div.listContainer ul').css
('height');
alert(heigthOful);
});
Now i get the output on the alert from all others "1100" and IE i get
the same now "1100"
whay I want to set it once is that I have several hovers that will use
the same code so rather than clutter up the code and have loads of un-
needed code thought I woud set it once and that would be it.
Any help would be apprciated
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.375 / Virus Database: 270.12.92/2203 - Release Date: 06/26/09 05:53:00