I wrote this very simple code to expand and collapse a text when pressing a button, but it doesn't work.
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script>
$('.expand').click(function(){
$('.content').slideToggle('slow');
});
</script>
</head>
<body>
<div class="sitesection">
<p class="expand"><a href="#">Click Here To Display The Content</a></p>
<p class="content">Hello World!"</p>
</div>
</body>
</html>
When I click on "Click here to display the content", nothing happens.
Click here to display the content
Hello world!