Using JavaScript to close the answer container


show more Using JavaScript to close the answer container provides you with in-depth training on Web. Taught by Chris Converse as part of the Create an Expandable FAQ Listing with jQuery and Dreamweaver show less
please wait ...

Using JavaScript to close the answer container

Now to begin writing our JavaScript to open and close the answer based on clicking the question, let's switch over to faq.js. Inside up here we're going to start by using jQuery's document ready statement. So let's start by typing a dollar sign, beginning parenthesis. Now if you're using Dreamweaver CS5.5, there's built-in code completion for jQuery, so you'll notice I can see the word "document" in this, and I can use my arrow keys to select from the individual items. If you're not using Dreamweaver CS5.5, you can still type in all of the JavaScript statements, but you'll just have to type them in by hand, and I'll be doing that throughout the course as well.

So let's start by typing document, inside of the parentheses, end the parentheses. Outside of the parentheses, type .ready, beginning and ending parentheses, semicolon, inside of the parentheses for ready, type function, beginning and ending parentheses, beginning and ending brack...

Using JavaScript to close the answer container
Video duration: 4m 54s 41m 48s Intermediate

Viewers:

Using JavaScript to close the answer container provides you with in-depth training on Web. Taught by Chris Converse as part of the Create an Expandable FAQ Listing with jQuery and Dreamweaver

Subject:
Web
Software:
Dreamweaver jQuery
Author:
please wait ...