Hi,
Currently, I have a carrousel on javascript which works when we click on hyperlink, like this :
<div id="direction1">
<p>
<a href="javascript:" class="carousel-control" rel="next"><img class="fleche_suiv" src="/project/images/next.png" alt="Suivant" title="Suivant" />
</a>
</p>
</div>
I would like execute this evenment with a onMouseOver too. So I try this, but it doesn't work :
<div id="direction1">
<p onMouseOver="this.getElementsByTagName('a').click()">
<a href="javascript:" class="carousel-control" rel="next"><img class="fleche_suiv" src="/project/images/next.png" alt="Suivant" title="Suivant" />
</a>
</p>
</div>
How to fix it ???
PS :
This is the JS code in question :
next: function () {
if (this.current) {
var currentIndex = this.current._index;
var nextIndex = (this.slides.length - 1 == currentIndex) ? (this.options.circular ? 0 : currentIndex) : currentIndex + 1;
} else {
var nextIndex = 1;
}
if (nextIndex == 0 && this.options.circular && this.options.effect != 'fade') {
this.scroller.scrollLeft = 0;
this.scroller.scrollTop = 0;
nextIndex = 1;
}
if (nextIndex > this.slides.length - (this.options.visibleSlides + 1)) {
nextIndex = this.slides.length - this.options.visibleSlides;
}
this.moveTo(this.slides[nextIndex]);
}