Y
Y
Yuri Denisov2015-11-12 14:18:37
JavaScript
Yuri Denisov, 2015-11-12 14:18:37

Why is the link to the site in nivoslider not changing?

Good afternoon!
There is such a problem. There is a slider on the page. It displays pictures with links. When the page is loaded, the photo corresponds to the link, after the slider makes the first pass and returns to the first picture, the link does not change, but the last one remains, and on all the other pictures then the same.

<div id="slider" class="nivoslider">
<a href="link1"><img width="180" height="270" src="180x270.png" class="attachment-sidebar-anons wp-post-image" alt="" /></a>
<a href="link2"><img width="180" height="270" src="180x270.jpg" class="attachment-sidebar-anons wp-post-image" alt="" /></a>
</div>

It turns out that the link remains link2 and it is constantly on all slides, if you reload the page, then the first pass shows correctly and then again incorrectly.
Calling nivoslider is also basically standard:
$(window).load(function() {
    $('#slider').nivoSlider({
    pauseTime: 4000,
    directionNav: false,    
    slices: 0,		
    boxCols: 0,
    boxRows: 0,
    controlNav: false   
  });
});

Help solve the problem. Nothing comes to mind as to why.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dru Dro, 2015-11-13
@denissov

Is the class name case sensitive? In your example, a lower case class is specified. Try class="nivoSlider" as in the documentation .
UPD: figured it out. the value of slices should be set equal to the number of slides. in your example: 2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question