We are using two views_slideshows on the homepage of our site www.urbanministry.org. The slideshow views are being printed on the page using views_build_view and are controlled by the following JavaScript:
<script type="text/javascript">
// set the timer data for opportunities view slideshow
$(document).ready(function() {
// these are the divs containing the elements to be displayed in the main div in rotation or mouseover
slideshow_data["1"] = new views_slideshow_data(5, 5000, 1, true, "normal", 0.25);
// this turns on the timer
views_slideshow_timer("1", true);
// this sets up the mouseover & mouseout to pause on the main element
$("#views_slideshow_main_1").hover(
function() {
views_slideshow_pause("1");
},
function() {
views_slideshow_resume("1");
});
});
// set the timer data for media view slideshow
$(document).ready(function() {
// these are the divs containing the elements to be displayed in the main div in rotation or mouseover
slideshow_data["2"] = new views_slideshow_data(5, 5000, 1, true, "normal", 0.25);
// this turns on the timer
views_slideshow_timer("2", true);
// this sets up the mouseover & mouseout to pause on the main element
$("#views_slideshow_main_2").hover(
function() {
views_slideshow_pause("2");
},
function() {
views_slideshow_resume("2");
});
});
</script>
To take the book/DVD review slideshow as an example, there are three inner DIVs: views_slideshow_div_1_0, ...1_1, ...1_2. Each is being changed in trun from display: none to display: block when it shows up. The problem is there's a time after the slideshow has cycled through all three DIVs when all three are set to display: none simultaneously for several seconds. Thus, none of the book/DVD reviews show up.
Comments
Comment #1
EvanDonovan CreditAttribution: EvanDonovan commentedI determined what was wrong - as I said in my initial issue, there are three inner DIVs. The function prototype for the views_slideshow_data constructor is as follows:
function views_slideshow_data(num_divs, timer_delay, sort_order, fade, fade_speed, fade_value)
.So I needed to change
slideshow_data["1"] = new views_slideshow_data(5, 5000, 1, true, "normal", 0.25);
toslideshow_data["1"] = new views_slideshow_data(3, 5000, 1, true, "normal", 0.25);
& likewise for the second instantiation. Otherwise, it was trying to apply styles to 2 nonexistent divs.At this point, I'm not sure whether the code generated by the initial view was correct & it only got incorrect when I copied it into another page. If someone wants, they can check up on that. But my issue is fixed.
Comment #2
Anonymous (not verified) CreditAttribution: Anonymous commentedAutomatically closed -- issue fixed for two weeks with no activity.