• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

jQuery Question


#1
So I have the following code:

HTML:
            <div class="sub-container">
                <div id="image"><a href="lib/img/portfolio/sample.jpg" title="This is a sample photo."><img src="lib/img/portfolio/sample.jpg" width="500" height="300" alt="" /></div>
                <div id="back"><a href="#"><span>Back</span></a></div>
                <div id="caption">123 Main Street, Anytown</div>
                <div id="next"><a href="#"><span>Next</span></a></div>
            </div>
I have a slider all set up. But I want to bind the caption div to the image div. How would I do this with jQuery?
 

Sunburn

Active Member
#2
lo iEthan,

Im not sure i quite understand what your trying to do here? can you explain in more detail what suppose to happen.

cheers
 
#4
I want the caption div and the image div to be together and do the same exact things. So, when the caption changes, so does the image.
 

Sunburn

Active Member
#5
can i see a working example of what you got so far?

id suggest, from my understanding of what your wanting to do, your markup isnt correct to start with,
there isnt a need for the caption div, in fact the contents of the caption div should be inside either the title tag of the a/img or in a span tag which could/should be in the image division.

Really need to see a working version to advice better