I have a few rolling quotes which are changing every 2 seconds.. The script works on my desktop (Chrome) and also on some mobile browsers (Firefox,..), but I am getting complaints that it doesn't work on iphone or mobile chrome..
The problem on the mobile is actually that the first quote is being displayed and after that it disappears, but the new one is not loaded.. Everything is just blank.. I have also tried to remove if statement and so on..
The problem is in showing up the 2nd quote or better said increasing the opacity to 1..
https://jsfiddle.net/8pht19r5/
Here is the JS excerpt:
function initQuoteCarousel() {
var $quotesWrapper = $(".cust-quotes");
var $quotes = $quotesWrapper.find("blockquote");
if (!$quotes.length) {
return;
}
var selectNextQuote = function() {
// keep move first quote in dom to the end to make continous
var $quote = $quotesWrapper.find("blockquote:first").detach().appendTo($quotesWrapper);
setTimeout(selectNextQuote, $quote.data("timeout"));
};
setTimeout(selectNextQuote, $quotes.filter(":first").data("timeout"));
}
$(function() {
initQuoteCarousel();
});