tbuck Posted August 4, 2009 Report Share Posted August 4, 2009 I'm a total newbie at js, so bear with me please. I'm using dw to make a simple site. I have a scrolling thumbar up and running that onclick shows a larger image to the right side of the page. The same onclick shows a paragraph of text that goes with that particular image. This is all done with dw built-in code writing. I want to have one more small caption appear(onclick) with each image (the photo credit), but have begun thinking that this would be better done with js. The dw method of show/hide layers seems a bit cludgy. Is this the best approach? Pointers. Thanks Link to comment Share on other sites More sharing options...
justsomeguy Posted August 4, 2009 Report Share Posted August 4, 2009 If it's already showing and hiding text, might as well use that for the caption also. Link to comment Share on other sites More sharing options...
tbuck Posted August 4, 2009 Author Report Share Posted August 4, 2009 If it's already showing and hiding text, might as well use that for the caption also.I had thought of that but it's starting to get unwieldy. Say I have a list of 12 captions. Each gets its own layer(div), then for each onclick thumbnail I have to go through and set the show/hide for each of the twelve. 11 hide and one show. My head spins. Seems to me that some sort of document.write into a div with the onclick would be more direct. Basically a js that just fills a div with a line of text on the same onclick event that shows the larger image.Am I thinking about this clearly? Link to comment Share on other sites More sharing options...
justsomeguy Posted August 4, 2009 Report Share Posted August 4, 2009 Yeah, that's another way to do it. You could store the captions in an array which you would write into a div, you would just need a way for it to know which caption to use with which image. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now