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
seal-mask
STAFF
.a{fill-rule:evenodd;}techdegree
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: