The code that I have is as follows:
<!DOCTYPE html>
<html>
<head>
<script src="javascript/jquery.js" type="text/Javascript"> </script>
</head>
<body>
<div id="demo"></div>
<script type="text/javascript">
document.getElementById("demo").innerHTML="Hi";
</script>
<script type"text/javascript">
$(function()
{
$("#demo").css("background", "#000000");
}
</script>
</body>
</html>
The issue that I’m having is that the second block of JS/Jquery doesn’t turn the background of the div black. What am I doing wrong?
1 Answer