I am rendering with php some amount of images, but also i render the a href="" – the images area changing when they are fading, but the url are the same.
How can I change the url and the image together?
JQuery Cycle
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The jquery Cycle plugin can cycle any any elment. So the easy way to do this is to just wrap each image with a hyperlink:
http://jsfiddle.net/lucuma/MV9S5/
Additionally you can use your slide attributes if perhaps you have a title you want updated that is outside of the sliders. You’d use the after event. The following code updates the
h1‘s hyperlink after each slide changes. It sets the text to be the title of the img on the slide. Because my images are wrapped in a hyperlink, I need this linevar $cur = $('img', currSlideElement)to get to the img element of the slide.Demo: http://jsfiddle.net/lucuma/dsK9S/2/