I'm learning materializecss and I'm trying to create a sidenav
, but I'm having problems, I'd like to know where, follow the little code:
<!DOCTYPE html>
<html>
<head>
<title>Materialize</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/css/materialize.min.css">
</head>
<body>
<ul id="slide-out" class="side-nav">
<li><a href="#">Home</a></li>
<li><a href="#">Produtos</a></li>
<li><a href="#">Contato</a></li>
</ul>
<a class="btn" data-activates="slide-out"><i class="material-icons">menu</i></a>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script><scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0-rc.2/js/materialize.min.js"></script>
<script>
$(document).ready(function(){
$('.btn').sidenav();
});
</script>
</body>
</html>
When I open the browser, it looks like this:
It's such a simple code, but I do not understand.