PLEASE HELP OR TELL ME IF THIS IS POSSIBLE BY ENSDAY NIGHT. The spinning and everything works it just wont go where i want or reload when its re-selected.I want the 360 image sequence to be displayed at the bottom in the caption div, but i cant get it in there. Also i want the 360 image sequences to load only for each still image above the caption that corresponds to each 360. i dont know how to link everything properly in jfiddle but the code is there if you think you can help.
$(document).ready(function(){
$('.carousel_data .carousel_item').each(function(){
$('#carousel').append($(this).find('.image').html() );
});
createCarousel();
showCaption();
});
//custom function for roundabout called createCarousel
function createCarousel(){
$('div#carousel').roundabout({
childSelector: 'img',
startingChild: window.startingItem,
tilt: -11.5,
minOpacity: 7,
minScale: .3,
duration: 1200,
clickToFocus: true,
clickToFocusCallback: showCaption
});
createCustomButtons ()
}
//custom function to wire next & prev buttons to roundabout carousel
function createCustomButtons (){
$('.nextItem').click(function(){
hideCaption();
$('div#carousel').roundabout('animateToNextChild', showCaption);
});
$('.prevItem').click(function(){
hideCaption();
$('div#carousel').roundabout('animateToPreviousChild', showCaption);
});
$('div#carousel img').click(function(){
hideCaption();
});
}
//custom function to showCaption
function showCaption(){
var childInFocus = $('div#carousel').data('roundabout').childInFocus;
var setCaption = $('.carousel_data .carousel_item .caption:eq('+childInFocus+')').html();
$('#captions').html(setCaption);
var newHeight = $('#captions').height()+'px';
$('.caption_container').animate({'height':newHeight},500,function(){
$('#captions').animate({'opacity':1},150);
});
}
function hideCaption(){
$('#captions').animate({'opacity':0},250);
}
Aucun commentaire:
Enregistrer un commentaire