0

I'm trying to write a jQuery function to change out href of a link, but I'm not quite sure how to do it. I've implemented a slider, but I have a link which lives outside of the slider (outsideLink) which needs to change as the slider changes.

I'm trying to achieve the following:

for each link in sliderList
     get currentLink.href
     outsideLink.href = currentLink.href
     wait 3 seconds
     repeat
end

I'm not sure how to implement the delay when I'm going through a list of items though.

1 Answer 1

2

I'd approach this a bit different, just update it when the slider changes like this:

$('.selector').slider({
  slide: function(event, ui) {
   //outsideLink.href = currentLink.href
  }
});

You can see a full list of slider events here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.