the details you want to display can also be contained elsewhere if you
want by using the index of the current slide to match the index of
another set of containers function onAfter(curr, next, opts) { var index = opts.currSlide; // use index to refernece other containers to work with } thus you can hide a series of containers and display the ones you want on each slide. Also can use the onBefore to hide, animate or whatever to remove the info showing , let new slide show up, then add new info with onAfter Mescalero wrote: Thanks guys, Using that, this is what i have:$(function() { $('#slides').before('<div id="nav" class="nav">').cycle({ fx: 'fade', speed: 'fast', timeout: 0, pager: '#nav', after: onAfter }); }); function onAfter() { $('#article-description').html("<h3>" + this.title + "</ h3>") .append('<p>' + this.alt + ' <a href=''>Read more ›</p>'); } and then in the body i have something like: <img name="" src="" width="388" height="218" title="Botanical Garden" alt="Almost 300 acres, the botanical garden has miles of streams and nature trails, display gardens, and flowers and plants." link="http://www.scbg.com" /> the only problem is that this.link is coming up undefined. I am curious where i need to define it so that it will pick up the link attribute like it does "src" and "title." If i just put the link in the unused 'name" attribute and change to + this.name it also works, but that i may want other attributes later down the road...does this make sense? Matt On Jul 20, 7:07 pm, Mike Alsup <mal...@gmail.com> wrote:I would like to add another attribute to the img tag called "link."This attribute would define where the image would link to if someone clicks the image.Then i could do something like: .append('<p>' + this.alt + ' <a href=''>Read more ›</p>');Does anyone know what/where i can add in the cycle js to accomodate for this.link?Check out the 'callbacks' example on this page: http://www.malsup.com/jquery/cycle/int2.html |
- [jQuery] jQuery Cycle Plugin and Links Mescalero
- [jQuery] Re: jQuery Cycle Plugin and Links Charlie
- [jQuery] Re: jQuery Cycle Plugin and Links Mike Alsup
- [jQuery] Re: jQuery Cycle Plugin and Links Mescalero
- [jQuery] Re: jQuery Cycle Plugin and Links Charlie
- [jQuery] Re: jQuery Cycle Plugin and Links artistique