I've got a site where the template has a slideshow built-in to run on the home page, you just drop a few images in a location and you hard-code them in the page.tpl.php file, and it uses a simple jquery cycle script to rotate through them.

I'm trying to implement ddblock to have a text-only slideshow on the home page, and it seems to conflict with this setup. The ddblock appears, but it starts to go awry on the first slide transition. There'll be blank slides randomly, the pager is out of sync with the slide, a slide will fade in and disappear in less than a second (4000 ms pause time).

If I place the ddblock on any other page where there is no other cycling, it works fine (though the height is strangely truncated at a couple hundred px). On the homepage, the photo slideshow is not disrupted at all, perhaps since the script that runs it is actually on the page and not included from elsewhere? Has anyone encountered and, more importantly, defeated this before? I'm not super jquery user yet, so my ideas of renaming functions or using different instances of jquery seem like low-probability. But you see sites that have all sorts of jquery slideshows running concurrently so there must be a way.

BTW, here is the script the photo slideshow uses:

<script type="text/javascript">
$(document).ready(function($) {
    $('.slideshow').cycle({
                fx: 'fade' , timeout: 8000, delay: 2000});
});</script>

Comments

taquil’s picture

Status: Active » Closed (fixed)

The problem here is that the theme is using the name "slideshow" as a class name and that is conflicting with jquery's purposes and changing it in the script, css, and html on the home page template was enough to rectify the situation.