-
EBT Blocks 🧱
-
EPT Paragraphs 🆕
-
Resources & Support
- Drupal Book
- Blog
- Case Studies
- Drupal Documentation
- JSON Drop API Documentation
- Forum
- What's New
- Download Drupal
- Contact
Canvas Palette - Make it Colorful🎨
Canvas Palette - Drag in blocks, drop in a video, add a splash of color - no design degree required.
Extra Block Types (EBT) - New Layout Builder experience❗
Extra Block Types (EBT) - styled, customizable block types: Slideshows, Tabs, Cards, Accordions and many others. Built-in settings for background, DOM Box, javascript plugins. Experience the future of layout building today.
❗Extra Paragraph Types (EPT) - New Paragraphs experience
Extra Paragraph Types (EPT) - analogical paragraph based set of modules.
GLightbox is a pure javascript lightbox (Colorbox alternative without jQuery)❗
It can display images, iframes, inline content and videos with optional autoplay for YouTube, Vimeo and even self-hosted videos.
How do I use Bootstrap scrollspy?
I would like to use Bootstrap's scrollspy plugin in Drupal 8. So I edited the html.html.twig file replacing
<body{{ attributes.addClass(body_classes) }}>
With
<body{{ attributes.addClass(body_classes) }} data-spy="scroll" data-target=".nav-scrollspy" data-offset="50" >
Where .nav-scrollspy is the class of my navigation block. Additionally I added the following JavaScript to my theme:
$('body').scrollspy({ target: '.nav-scrollspy' });
But as this does not work I were wandering whether or not this plugin is already integrated in Drupals Bootstrap theme. Apparently not, as I could not locate such a file in themes/bootstrap/js/.
Unfortunately I did not find such a file in the web neither, so I am asking my self, where to get it and how to add it to Drupal?
- Log in to post comments
AFAIK your bootstrap theme will be having
bootstrap.jsorbootstrap.min.jsincluded. Generally, scrollspy plugin related code will be inside these files.So try to recheck whether you have added
nav-scrollspyto your div element. I think you might need to have 'id' for your div element and a proper link to it.Also in Drupal 8, caching is a bit aggressive so try to rebuild your cache and check again. For better understanding refer http://www.sitepoint.com/understanding-bootstraps-affix-scrollspy-plugins/