malsup / cycle2

2nd gen cycling
899 stars 236 forks source link

Current Slide all sinc short"lazy"cut #630

Closed Marceloldel closed 9 years ago

Marceloldel commented 9 years ago

Ok, i am really sorry for this, really i am, my question might be even annoying for you but...

How culd i sinc an element in my code using getelementby with the current showing slide?

What i need is the url/src of the current slide showing in the content of the slideshow so i can put it in this cycle´s2 section showed below. If i just culd get the current slide src/url and equals to my element it would be perfectly sinc with any action taken in the slideshow like prev or after or when the slideshow slides automatically, by just punting it after "opts.easing, function() {" i would sinc my element with the slide and create a panel with information regarding that slide with no further need of coding.

// make sure animIn has something so that callback doesn't trigger immediately next.animate(opts.animIn || { opacity: 1}, opts.speed, opts.easeIn || opts.easing, callback); };

    next.css(opts.cssBefore || {});
    curr.animate(opts.animOut || {}, opts.speed, opts.easeOut || opts.easing, function() {

my element here getelementbyid('myelement').src = currentlide.src // just an example

thank you ahead for your time.

and again sorry about this (might be) annoying question.

Marceloldel commented 9 years ago

ok found it:

var idsrc = opts.slides[opts.currSlide]; getelementbyid('myelement').src = idsrc.src;