[jQuery] Re: Cycle plugin creating links

2009-08-29 Thread Charlie





Several methods:

Simplest is put an a tag around each image in your markup. 

Alternate method- create array of the url's and bind a click handler to
images. Index the images to the url array and the window function you
want such as open() for a new tab. Will need to modify cursor in CSS
for this method

var
urlArray=['http://www.yahoo.com','http://www.google.com','http://www.ebay.com'];

 $("#mySlideshow img").click(function() {
  var imageIndex= $(".pics img").index(this);
  window.open(urlArray[imageIndex])// to open in same window use
window.location.assign(urlArray[imageIndex])
 
 });

quez wrote:

  Hi all,
I would like to link each image in the cycle to a specific page. Any
ideas on how to do this? I got it to cycle and everything is working
fine. I just want it so that the actual image is clickable.

Thank you.

  






[jQuery] Re: Cycle plugin creating links

2009-08-29 Thread Mike Alsup

 I would like to link each image in the cycle to a specific page. Any
 ideas on how to do this? I got it to cycle and everything is working
 fine. I just want it so that the actual image is clickable.


Here's an example:

http://www.malsup.com/jquery/cycle/anchor.html