Hello
First very simple question: why ist this not allowed?
[code]
$(document).ready(
var isplaying = false;
//something else
);
[/code]
and this is?
var isplaying = false;
$(document).ready(
//do something else
);
[/code]
==============
Second Question. When I load this page in FF, Firebug gives my 1
Error: missing ) after argument list });\n (Line28)
[code]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Siggi Bucher: Photographin</title>
<meta name="description" content="Siggi Bucher - Photographin
aus
Leidenschaft" />
<meta http-equiv="Content-type"
content="text/html;charset=UTF-8" />
<link rel="stylesheet" href="screen.css" type="text/css"
media="screen" />
<script type="text/javascript"
src="inc/jquery-1.1.3.1.pack.js"></
script>
<script type="text/javascript">
var isplaying = false;
$(document).ready(
$("#gomusic").click(function() {
if(!isplaying) {
popUp("sound.html");
$("#gomusic").text("sound off");
$("#gomusic").attr("href","#");
var isplaying = true;
} else {
sound.close();
$("#gomusic").text("sound on");
var isplaying = false;
}
return false;
});
function popUp(url) {
sound=window.open(url,'soundbumbam','height=50,width=150');
window.focus();
return false;
}
);
</script>
</head>
<body>
<div id="left">
<div id="sound">
<a href="javascript:popUp('sound.html');"
id="gomusic">sound on</
a>
</div>
</div>
</body>
</html>
[/code]