This code works in IE8, Crome and Safari, but not in firefox:
<script src="@Url.Content("~/Scripts/jquery-1.5.1.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/modernizr-1.7.min.js")" type="text/javascript"></script>
<script type="text/jscript">
alert("wazzup");
$(document).ready(function () {
$(".MathLink").hover(function () {
$(this).css("color", "#d7d7d7");
}, function () {
$(this).css("color", "#FFFFFF");
});
$("#betyg_textblock").click(function () {
window.open("http://hogrebetyg.se/");
})
$("#roids_textblock").click(function () {
window.open("http://www.kongregate.com/games/irradiance_se/roids?acomplete=roids");
})
$(".servicesDiv").mouseenter(function (event) {
if ($(this).css("height") == "45px") {
$(".servicesDiv").animate({
height: "45px"
}, 300);
$(this).animate({
height: "100px"
}, 300, function () {
$(".servicesDiv").clearQueue();
});
}
});
$(".news").click(function (event) {
if ($(this).css("height") == "53px") {
$(this).animate({
height: "100%"
开发者_开发百科 }, 400, function () {
$(".news").clearQueue();
});
}
else {
$(this).animate({
height: "53px"
}, 400, function () {
$(".news").clearQueue();
});
}
});
});
</script>
I have no idea why. Please help.
See the following:
text/javascript
Opera 7.54+
IE 5+
Firefox 1.0.7+
Safari 2.0.3+
iCab 3 Beta 394
Camino 2006021400
text/jscript
Opera 7.54+
IE 5+
Safari 2.0.3+
Change it to text/javascript
Ref: http://sachabarber.net/?p=824 AND http://krijnhoetmer.nl/stuff/javascript/mime-types/
e.g.
<script type="text/jscript"> /*Code*/ </script>
To
<script type="text/javascript"> /*Code*/ </script>
精彩评论