Below is part of the code I'm using to navigate through a CSS3 slideshow thats being animated with a cubic bezier and timed with keyframes.
At the moment this line of code...
$("#carousel .video-list").animate({'left' : left_indent}, 1000, function () {
… is conflicting with the current css i have as I've learnt they cannot be used together. My question is how do I edit that line of code so that it's .css instead of .animate in order for it to function and not conflict with my css3 animation?
JS
var item_width = $("#carousel .video-list li").outerWidth();
var left_value = item_width * (-1);
//if user clicked on prev button
$('#previous').click(function () {
//get the right position
var left_indent = parseInt($("#carousel .video-list").css('left')) + item_width;
//slide the item
$("#carousel .video-list").animate({'left' : left_indent}, 1000, function () {
$(".video-list, #timeline, .description-list").css({"animation-play-state": "paused",
"-webkit-animation-play-state": "paused"});
//move the last item and put it as first item
$("#carousel .video-list li:first").before($("#carousel .video-list li:last"));
//set the default item to correct position
$("#carousel .video-list").css({'left' : left_value});
$("#myVideo").get(0).play();
$("#myVideoTwo").get(0).play();
$("#myVideoThree").get(0).play();
$("#myVideoFour").get(0).play();
});
//cancel the link behavior
return false;
});
Any help would be appreciated, many thanks!