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=' + this.link +'>Read more ›</p>'); } and then in the body i have something like: <img name="" src="images/features/botanical.jpg" 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=' > > + this.link +'>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