I am trying to call the jquery flip function in my javascript code, but i am not able to do that.
Code:
var footwear = [
['images/product_images/footwear/footwear_1.jpeg'],
['images/product_images/footwear/footwear_2.jpeg'],
['images/product_images/footwear/footwear_3.jpeg'],
['images/product_images/footwear/footwear_4.jpeg'],
[]
];
function startSlidecat1() {
for (var i = 0; i < footwear.length; i++) {
var image = footwear[i][0];
imgslidercat1(image, i * 2100, i == footwear.length - 1);
}
};
function imgslidercat1(image, timeout, last) {
window.setTimeout(function() {
document.getElementById('category-1').innerHTML = "";
var product = document.getElementById('category-1');
var elem = document.createElement("img");
product.appendChild(elem);
elem.src = image;
if (last) {
startSlidecat1();
}
}, timeout);
}
startSlidecat1();
Jquery flip code
$(document).ready(function () {
$('.box-1').delay(400).css('display', 'block');
$('.box-1').transition({
perspective: '100px',
rotateY: '360deg'
}, 600)
});
The javascript code iterates through array and calls the imgslidercat1() function with parameters, and at end the function is repeated execution. but before repeating execution i want to call JQuery flip action code. the jquery code sets display to block at beginning, at the end it should set display back to none. after executing the jquery the javascript should continue again.
How can i do this?
onreadyand anywhere else needed...imgslidercat1()you want to run whatever is inside the$(document).ready()block?.transition()from?