diff --git a/docs/javascript.html b/docs/javascript.html
index 424ee24480ed871eaf1a60955017c41234bfa6ef..bcecdce46028e33bcee42ae726f05ecb8be06627 100644
--- a/docs/javascript.html
+++ b/docs/javascript.html
@@ -554,7 +554,7 @@ $('.dropdown-toggle').dropdown()
           <h3>Via JavaScript</h3>
           <p>Call the scrollspy via JavaScript:</p>
 {% highlight js linenos %}
-$('#navbar').scrollspy()
+$('.navbar').scrollspy()
 {% endhighlight %}
 
           <div class="alert alert-info">