Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Adding content to Sliding Panels

From: Dreamweaver CS3 Projects: Creating Custom Spry Widgets

Video: Adding content to Sliding Panels

Now that we have our Sliding Panel DIVs in place, we'll replace the placeholder content with our product information content. To keep the code clean and well structured, we'll use a simple header and paragraph for our information, adding graphics and formatting later through CSS. So I've opened of the details_start page in the Chapter 5 directory so if you're following along with me, go in Chapter 5 folder and open up the details_start page you'll find there. Now I'll scroll down a little bit and we see our first, second and third panel content and the fourth panel of content.

Adding content to Sliding Panels

Now that we have our Sliding Panel DIVs in place, we'll replace the placeholder content with our product information content. To keep the code clean and well structured, we'll use a simple header and paragraph for our information, adding graphics and formatting later through CSS. So I've opened of the details_start page in the Chapter 5 directory so if you're following along with me, go in Chapter 5 folder and open up the details_start page you'll find there. Now I'll scroll down a little bit and we see our first, second and third panel content and the fourth panel of content.

What we're doing here you can either do it in Code View if you're more comfortable hand coding or you can do here in Design View, if you're comfortable adding structure in Design View. So we'll go ahead and start by doing it in Design View. So, I'll highlight the first panel content and I'm being very careful not to actually select to the entire DIV tag because I don't want to replace that. I just want to replace the content inside of it. So the first line I'll type is our Desolve Hoody because the first product we're describing is in fact, the Desolve hoody right above it. Now I'll hit Enter and you're going to be taking little dictation here, so bear with me.

And if you want, this is actually in the finished files so if you don't feel like typing you can do little copying and pasting from there. Then I'll type in 'Our Desolve hoody is 100%- except for the zipper. That's made of steel' and we'll do dot, dot, dot, 'stainless steel baby!' Did I mention we're a very irreverent company? 'Wear this out on the town and state that your a person that dances to no drummer.

Plus, we don't sell a lot of them. So you'll be the only cat in town with one.' There we go. I'll take the first line, which is be the Desolve Hoody, click inside of it and I'll format that as a Heading 2. And that's going to serve as the formatting for the rest of this. Now as soon as I do that you notice, wow. That does not look good at all and that has everything to do with our document's default styles and we'll talk about in a moment.

So to avoid having to look at this, I'll switch over to Code View. And in Code View, again, we can simply do a little bit of copying and pasting here. So I'm going to copy the H2 and the paragraph tag, make sure you get both the opening and closing tags for both the heading and the paragraph. I'll copy this and then I'll highlight the Second Panel Content and paste it in that. And then I'll just change what is between the tags. So the first one, which is heading two, is going to be our AsterRisk T-shirt.

And if you don't want to spell it that way, you don't have to. This is after all your application. And in this we're going to type in 'Do you like really big, cool prints on your T's? Well, our famous AsterRisk T-shirt is for you! Bold, colorful and beautiful, this T-shirt will have your friends guessing which buildings are which.

Show your urban geek cred!' And yes, I'm a frustrated copywriter. Scroll down a little further. Once again I'm going to highlight Third Panel Content, paste that in there. The heading is going to be the Desolve Messenger Bag. And then we'll highlight the paragraph contents and I'll type in, 'Got stuff? Need to carry that stuff? Well man have we got a bag for you! Our Desolve Messenger Bag is made of durable canvas and comes with three organizer pouches.

There's no padding for your laptop, but shouldn't your laptop be able to handle a little abuse? Green is the color of our Messenger Bag.' And a last one. Which I know you're really happy about. You didn't figure you'd be taking dictation all this title, did you? Well here, last headline is going to be Long Sleeve T.

And inside our paragraph, we're going to say, 'Is it cold where you live? Do you still want to look cool regardless of the weather? Well then the Long Sleeve Logo T is for you. It still says Desolve in-your-face while allowing you to stay toasty, warm and snug.

Beefy, all cotton design. I'll save that. Flip back over to Design View. Well, there's one last thing we need to do here and that's add some prices for these. And our price is going to be wrapped with a span tag with a class on it so it's a lot easier for us to do that visually here. So after the first paragraph, after the last sentence there, I'll type a space and then that's going to be $50, so I'll just highlight $50, and using the Properties inspector where it says Style, I'll grab that pulldown menu. And I'm going to choose price.

It's going to re-style that and don't worry about that because what it's done for us is exactly what we need it to do. It's surrounded it with a span tag and gave it the price class. So that's not what the finished rendering is going to look like; it's just what it's going to look like right now. So let's go it for the AsterRisk T-shirt as well. That's going to be $18. Get that guide out of the way. We'll highlight that and we'll go ahead and choose price and we'll go down to our Desolve Messenger Bag and we'll do $75 there.

Highlight that, once again choose price. And our finished one, which will be our Long Sleeve T, that's going to be $25. Highlight that and we'll choose price. Perfect. Everything is now in place for us to add our functionality. The code is structured with the appropriate class and ID values and the content is all in place. Our next step will be to add the links to our external JavaScript and CSS, add the constructor function and add the event handlers that will trigger our widget.

Show transcript

This video is part of

Image for Dreamweaver CS3 Projects: Creating Custom Spry Widgets
 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

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.


Mark all as unwatched Cancel

Congratulations

You have completed Dreamweaver CS3 Projects: Creating Custom Spry Widgets.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.