Kyle wraps up the solution to the first task by performing an AJAX request and displaying the modal dialog.
(flute music)…- The element that was clicked on is an A tag, right?…Which has an href in it and that href is the URL…that we want to load.…We want to load that file up, we essentially want to make…a AJAX request for that file, get its contents,…and stuff it into a modal.…So, I can get the URL by looking at the element that was…clicked on, which is going to be evt.target,…that's the link that we clicked on.…
Okay, so now I have the url, jQuery has a nice simple syntax…for doing AJAX.…If you don't want to type this part, you're free…to just kind of copy and paste it,…which is what I'm going to do 'cause I don't want to type it.…So you can copy and paste…from the solutions file if you like.…But this is how we do an AJAX call.…I'm giving it the URL and I'm telling it…
Note: This course was created on 03/29/2016 by Frontend Masters. We are pleased to host this content in our library.
- Carousels, panes, and modules
- Middle-end architecture
- Secure phrase generator
- Routing functions
- Calling the API
- Rendering on the page
- Shared data validation
Skill Level Intermediate
2. Organizing Code
5. Adding a Shared Module
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.