]> git.ipfire.org Git - thirdparty/bootstrap.git/commitdiff
Clarify ScrollSpy 'activate' event element
authorMike Jacobson <michaeljjacobson1@gmail.com>
Sun, 1 Oct 2017 22:26:37 +0000 (15:26 -0700)
committerMark Otto <markd.otto@gmail.com>
Tue, 3 Oct 2017 01:55:22 +0000 (18:55 -0700)
docs/4.0/components/scrollspy.md

index 32a86d839ff727127124c8836d31253d18991a24..b7f9e994fd571d58542cc11dee950baec81e5935 100644 (file)
@@ -316,13 +316,13 @@ Options can be passed via data attributes or JavaScript. For data attributes, ap
   <tbody>
     <tr>
       <td>activate.bs.scrollspy</td>
-      <td>This event fires whenever a new item becomes activated by the scrollspy.</td>
+      <td>This event fires on the scroll element whenever a new item becomes activated by the scrollspy.</td>
     </tr>
   </tbody>
 </table>
 
 {% highlight js %}
-$('#myScrollspy').on('activate.bs.scrollspy', function () {
+$('[data-spy="scroll"]').on('activate.bs.scrollspy', function () {
   // do something…
 })
 {% endhighlight %}