由于某种原因,我的 Jquery 脚本无法在 IE7 上运行。但是,它确实适用于所有其他浏览器。我在某处读到 IE7 对逗号等非常挑剔,但我不知道我在这里做错了什么。有什么线索吗?
$(document).ready(function() {
var isiPad = navigator.userAgent.toLowerCase().indexOf("ipad");
var paddingLeft = ($(window).width() - 820) / 2;
var paddingRight = ($(window).width() - 820) / 2;
if( /Android|webOS|iPhone|iPad|iPod|BlackBerry/i.test(navigator.userAgent) )
{
$(window).resize(function()
{
paddingLeft = ($(window).width() - 820) / 2;
$('.block_bouw').css('padding-left', paddingLeft);
paddingRight = ($(window).width() - 820) / 2;
$('.block_industrie').css('padding-right', paddingRight);
});
$('.block_bouw').css('padding-left', paddingLeft);
$('.block_bouw').delay(0).animate({
marginLeft: '0',
}, 0, function() {
});
$('.block_bouw').click(function(){
window.location = 'bouw';
});
$('.block_industrie').css('padding-right', paddingRight);
$('.block_industrie').delay(0).animate({
right: '0',
}, 0, function(){
});
$('.block_industrie').click(function(){
window.location = 'industrie';
});
}
else {
$(window).resize(function()
{
paddingLeft = ($(window).width() - 820) / 2;
$('.block_bouw').css('padding-left', paddingLeft);
paddingRight = ($(window).width() - 820) / 2;
$('.block_industrie').css('padding-right', paddingRight);
});
$('.block_bouw').css('padding-left', paddingLeft);
$('.block_bouw').delay(500).animate({
marginLeft: '0',
}, 2000, function() {
});
$('.block_bouw').click(function(){
window.location = 'bouw';
});
$('.block_industrie').css('padding-right', paddingRight);
$('.block_industrie').delay(500).animate({
right: '0',
}, 2000, function(){
});
$('.block_industrie').click(function(){
window.location = 'industrie';
});
}
$(".product.module .item").css("margin-right","27px");
$(".product.module .item:nth-child(3n)").css("margin-right", "0px");
$(".project.module .item").css("margin-left","26px");
$(".project.module .item:nth-child(3n)").css("margin-left", "0px");
$('.popout', this).hide();
$('.pin').hover(function(){
//var h = $('.popout', this).outerHeight() * -1;
var id = (this.id);
$('.popout').css("margin-top", ($('.popout',this).outerHeight()*-1)+14 );
$('.popout', this).show(100);
$('.option' + "#" + id).addClass('hover');
},function(){
$('.popout', this).hide(100);
$('.option').removeClass('hover');
});
$('.option').hover(function(){
var idoption = (this.id);
$('.popout').css("margin-top", ($('.popout' + "#" + idoption).outerHeight()*-1)+14 );
$('.popout' + "#" + idoption).stop().show(100);
},function(){
$('.popout').hide(100);
});
});