Dynamically injecting divs for the Q and A graphics


show more Dynamically injecting divs for the Q and A graphics 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 ...

Dynamically injecting divs for the Q and A graphics

Now to add divs into a every one of the questions for the Q and the A letters, let's come back over to our faq.js. Inside of the document ready after we've defined our click function that gets attached to every one of the faq_question classes, let's add a return. Let's start with dollar sign, beginning and ending parentheses. Inside of the parentheses we're going to type two tick marks for string literal, .faq. Outside of the parentheses, we're going to type .each, beginning and ending parentheses, semicolon.

Inside of each we're going to type function, beginning and ending parentheses, beginning and ending brackets. Let's split that open. So we're going to search for every time there's an faq div. Every time we find one we're going to type dollar sign, parentheses, this, .append, beginning and ending parentheses, semicolon. Inside of append two tick marks for a string literal. So what append is going to do is add anything inside of the string l...

Dynamically injecting divs for the Q and A graphics
Video duration: 2m 15s 41m 48s Intermediate

Viewers:

Dynamically injecting divs for the Q and A graphics 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 ...