I’m trying use bootstrap carousel.js from the breakdown of js file of bootstrap
i will just using carousel and dropdown menu, so i cant see carsouel.js and dropdown.js from the list but couldn’t figure our the main dependency files to run these two files
can anyone tell me the mian file to run carousel and dropdown as i will just using these two function from bootstrap javascript
Hey! I’ve been down that rabbit hole myself, so I totally get the confusion. If you’re just looking to use the carousel and dropdown features from Bootstrap, you don’t need to include the entire library, but there are a few key files you’ll need to make sure everything works smoothly.
Here’s what you should grab:
base-component.js
- This is like the backbone for a lot of Bootstrap components, including the ones you’re using.dom/index.js
andutil/index.js
- These are the utility files that handle DOM manipulation and other behind-the-scenes magic.
So, to keep it simple, you’ll want to include:
base-component.js
dom/index.js
util/index.js
carousel.js
dropdown.js
Once you’ve got those in place, you should be good to go with your carousel and dropdown. If something’s still not clicking, feel free to ask. We’ve all been there!
that didn’t worked with bootstrap 5, so i try to figure out manually including all js as shown below:
but still drop-down and carousel are not working
“Are not working” is a very useless error description. What is the developer console telling you?
i wrote my own custom code for drop-down and carousel, no more need for bootstrap js, working with animation for drop-down and slider, other-wise simple drop-down and slider have working well
So in the span of 45 minutes you abandoned bootstrap, wrote your own dropdown and carousel, and they both work flawlessly.
Congratulations?
i usually use bootstrap for responsive mainly for column, mainly i used bootstrap for few browser prefix which fix issues with different browser.