I'm trying to create a site using Bootstrap 3 RC1 with Scrollspy. My web page is pretty simple right now, and is essentially set up like this:
<html>
<head>
<!-- Head stuff here -->
</head>
<body>
<section id="section_1" data-spy="scroll">
<!-- stuff in here -->
</section>
<section id="section_2" data-spy="scroll">
<!-- stuff in here -->
</section>
<section id="section_3" data-spy="scroll">
<!-- stuff in here -->
</section>
<JScripts here ... />
</body>
</html>
I've initialized Scrollspy by calling $("section").scrollspy()
and I've set up an event handler like this:
$("section").on("activate", function(e) {
// do stuff
});
My problem is that this activate
event never gets fired. Does anyone know why it's not working? I noticed that all the tutorials use a navbar for highlighting the current section, but I don't really want a navbar.