I've got this开发者_运维技巧 silly problem (called Internet Explorer) that keeps breaking on something that no other browser has a problem with. Since this is pretty common ground, I thought I'd ask.
If I try to run this line through IE8:
$('#map').next('.point').remove();
I get nothing. If I completely remove the line, my little popups show up and begin to stack their contents together in the box (which is why I need to remove a div
with a class called point
.
I know IE has a history of off behavior with both .next()
and .remove()
, and I figure it has to do with .point
not existing on first click (Perhaps IE is hung up on removing something that doesn't exist?). I've tried setting conditions for that to even be called, and it still breaks. Any clue what I can do?
Looks like the problem is not the JavaScript but the CSS. If you inspect the page in IE, the div.point is being created correctly but not being displayed. In FireFox the div.point element gets an inline style of display:block but that inline style is not applied in IE. You can use Firebug to see that in Firefox and the IE developer tools (F12).
Change the .point style in your css from display:none to display: block and you should see the box.
Playing around with your site, it looks to me like your problem is that .fadeIn()
is not working, for whatever reason. If you call .show()
instead, it works. If I load a newer version of jQuery on your site, .fadeIn()
works as well. Are you stuck with 1.4.2, or can you upgrade?
精彩评论