JavaScript is enabled in the Chrome browser. I want an alert to appear when a paragraph is clicked. WHY is it not working?! If I had got the JavaScript working I assume the jQuery would also work.
Here is the _Layout.cshtml page:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>@ViewBag.Title - My ASP.NET MVC Application</title>
<link href="~/favicon.ico" rel="shortcut icon" type="image/x-icon" />
<meta name="viewport" content="width=device-width" />
@Styles.Render("~/Content/css")
@Scripts.Render("~/Scripts/jquery-1.7.1.js")
@Scripts.Render("~/bundles/modernizr")
<script>
$(document).ready(
$("#para").click(function() {
alert("you clicked the paragraph");
})
);
</script>
</head>
<body>
<p id="para">Some paragraph</p>
@Scripts.Render("~/bundles/jquery")
@RenderSection("scripts", required: false)
</body>
</html>