Trying to turn all <p> elements to red. I'm using the following js code with prototype and I'm getting an error that says each is not defined in my firefox window.
var paragraphs = $$('p');
each(paragraphs, function(element) {
element.style.color = "red";
});
Html Code:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="scriptaculous.js"></script>
<script type="text/javascript" src="prototype.js"></script>
</head>
<body>
<p>His chad</p>
<p>How are you</p>
</body>