Hello,
I observe, that item in carousel which is on front get class .active and mainly when is sent to front automatically(autorotate) or via navigation arrows, but I can not find out if is it via mouse wheel rotate also.
my goal is show/hide text according to the picture that is on the front:
Code: |
function checkRotate() {
if ($('#acc_95.ari-cloud-carousel > div.ari-cloud-carousel-iwrapper > a.active > img.cloudcarousel.active' ).attr('src') == '/images/cabinets-de/01_GE.png')
{
$('#G-text').show("slide");
$('#Z-text').hide("slide");
$("#testing").hide("slide");
$('#acc_95.ari-cloud-carousel > div.ari-cloud-carousel-iwrapper > a:nth-child(1) > img.cloudcarousel' ).css({opacity:1 });
$('#acc_95.ari-cloud-carousel > div.ari-cloud-carousel-iwrapper > a:nth-child(2) > img.cloudcarousel' ).css({opacity:0.7});
$('#acc_95.ari-cloud-carousel > div.ari-cloud-carousel-iwrapper > a:nth-child(3) > img.cloudcarousel' ).css({opacity:0.7});
}
if ($('#acc_95.ari-cloud-carousel > div.ari-cloud-carousel-iwrapper > a.active > img.cloudcarousel.active' ).attr('src') == '/images/cabinets-de/02_Z_I10.png')
{
$('#G-text').hide("slide");
$('#Z-text').show("slide");
$("#testing").hide("slide");
$('#acc_95.ari-cloud-carousel > div.ari-cloud-carousel-iwrapper > a:nth-child(1) > img.cloudcarousel' ).css({opacity:0.7});
$('#acc_95.ari-cloud-carousel > div.ari-cloud-carousel-iwrapper > a:nth-child(2) > img.cloudcarousel' ).css({opacity:1});
$('#acc_95.ari-cloud-carousel > div.ari-cloud-carousel-iwrapper > a:nth-child(3) > img.cloudcarousel' ).css({opacity:0.7});
}
}
setInterval(checkRotate,800);
*/
|
this works fine when the picture is sent to front via navigation arrows or via auto rotate, but via mouse wheel not.