Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

Where's the Javascript with the modal window?

There has to be some javascript running this modal window since it's created based upon user interactivity. does bootstrap not show you the javascript linked with the modal window component because it's part of the framework that developers aren't allowed to edit?

I totally get how this all works I just don't get why bootstrap doesn't show the corresponding javascript for the modal window in order for developers to edit said programming and make it more customizable.

1 Answer

Robert Manolis
STAFF
Robert Manolis
Treehouse Guest Teacher

Hi sarahmoore4, hard to say without running and inspecting the code myself. But here's some info to consider. First, it is possible to create a pure CSS modal. But if the Bootstrap modal is using JS, you should be able to inspect the code. If you've downloaded the Bootstrap files, you should have access to them in your directory. Or if you're using a CDN link for Bootstrap, you should be able to view the source files in the source tab of the Chrome DevTools, or by adding break points to some JS, and slowly stepping through the functions. Or perhaps you could overwrite the default functionality with your own JS. You could target the button and the modal, remove event listeners, add your own. Sounds like a great opportunity for some fun experimentation. Best of luck and happy coding! :thumbsup: