Chrome/Safari: jQuery works in .htm but not in .aspx
I have a site where I display some jQuery dialogs. But in Chrome/Safari the dialog is not opened in center of the screen but a long way down the page. The site is programmed in开发者_运维百科 ASP.NET but when I copy-paste the generated HTML to a .htm file the thing works fine. Very weird :/
Try: http://tinyurl.com/yj4vkm7 - works in Safari/Chrome.
And: http://tinyurl.com/yj32kz9 - do not work in Safari/Chrome.
Click on the "Tilmeld hold!" buttons below Google Maps images.
The main difference I found was this at the top.
<?xml version="1.0" encoding="utf-8"?>
The resolution most likely requires removing that.
Each page displays the same in Firefox 3.5.
Do you have a diff tool? I used one on the output of your two pages. ChaosPandion noted the first diff, which is at the top of aspx page.
A diff tool will help you find differences between two files. There are other differences I easily found, like at lines 40 and 41 (41 and 42 in the aspx file) for instance.
open: function(event, ui) { $('object.frame').hide(); },
close: function(event, ui) { $('object.frame').show(); }
vs
open: function(event, ui) { $('object.legacy').hide(); },
close: function(event, ui) { $('object.legacy').show(); }
Hope that helps!
精彩评论