I tried opening the following code in both FF and chrome, nothing happened. But when I loaded the exact code in jsfiddle, it worked .
HTML:
<!doctype html>
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="fgerg.css" />
<script type="text/javascript" src="jquery-1.7.2.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#showButton').click(function() {
$('#x2').css('visibility','visible');
});
});
</script>
</head>
<body>
<input type="button" id="showButton" value="show" />
<p id="x"> gergreg</p>
<p id="x2"> sadeijnfciu </p>
</body>
</html>
CSS:
#x {
display:none;
}
#x2 {
visibility: hidden;
}
For anyone interested, the rectangle after the last });
caused the whole mess. Anyone know what is that ?