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
John Weland
42,478 PointsCreating and reusing DOM element in jQuery
I notice a lot of modal exmaples... OK all of the modal examples that I've found create a modal in the HTML code and then hide it and using either CSS, JavaScript or a combination of the two to show it when the time is right.
I want to create a modal in JavaScript that doesnt exist in the DOM until I execute. At that point I want to build that object populating things like a message and some form of user input.and a next/submit button.
The goal is to have a series of modals that pop up and as the user a questions (like a prompt), the user input field will vary depending on the question. Once the user inputs all the required info, it saves that info in a variable and they can repeat the process a few more times.
and pin that info to a spot on the canvas.
The project is a simple web page that runs helps a user calculate their back azimuth from an object. once you have 2 or more of those it will help you triangulate your position on a map.
its not meant to be live mapping software but rather a training aid to teach a person how to use a map and a compass to find their location on said map.