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

CSS

Gerald Torres
Gerald Torres
13,442 Points

Modal window not appearing

In the Frameworks Basics Course I am stuck on Building Modal Windows and Forms. I have done everything perfectly until 04:48. He demonstrates how his modal window appears when he clicks on the button but mine doesnt do the same. Here is my code:

<div class="modal fade" id="textModal"> <div class="modal-dialog"> <div class="modal-content">

      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">We'll Text You the Link!</h4>
      </div>

      <div class="modal-body">
      </div>

    </div>
  </div>

</div>

1 Answer

Samuel Johnson
Samuel Johnson
9,152 Points

Im not too sure what the rest of your code looks like but normally if its not responding im guessing its something to do with javascript not loading in the page. First check whether your getting an error in the console on the browser, you can see this in chrome by pressing 'alt-cmd-j' to bring the console up using chrome the press the button and see if some sort of error is registered?

Also make sure the correct files are being loaded when using a frontend framework? Check the js file is being loaded in the page? its easy to have a spelling mistake in the CDN link if your using one? again you check this in the resources panel (not to sure on the shortcut for this but can easily be found once you have the developer tools up in chrome)

Hope this helps but its the best answer i can give you with what you've provided. :)