- This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- The forum ‘JavaScript’ is closed to new topics and replies.
The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › JavaScript › IE 9 / FireFox – jQuery issue, Seems simple enough…
If you view the site in IE9, it is not recognizing the height set by jQuery…does anyone know a workaround or can tell me how crappy my jQuery is so i can fix it?
obviously it works in chrome, because chrome doesn’t suck arse.
Thanks Guys!
The Site: http://www.design-ninja.net
Here is the jQuery:
$(document).ready(function(e) {
var halfScreen = document.height / 2;
var tp = $('.top');
var btm = $('.bottom');
var map = $('div.map');
$('.top, .bottom').css('height', halfScreen);
map.hover(function() {
map.css('display', 'none');
tp.animate({
height: halfScreen - 100,
}, {
duration: 1000,
queue: false,
specialEasing: {
height: 'easeOutBounce'
}
});
btm.animate({
marginTop: '+=100'
}, {
duration: 1000,
queue: false,
specialEasing: {
marginTop: 'easeOutBounce'
}
});
});
});
This doesn’t have anything to do with IE “sucking arse.” document.height is non-standard and obsolete. If you want to use raw JavaScript, you should check document.documentElement.clientHeight , which works in all major browsers, including IE.
Since you’re using jQuery though, just utilize it to determine the height of the document.
var halfScreen = $(document).height() / 2;
Nice effect by the way.