Search code examples
javascriptjquerywordpressjquery-cyclejquery-cycle2

How to use Cycle2 while keeping compatible with NextGen?


According to the official FAQ, I can't use jQuery Cycle2 with its predecessor, jQuery Cycle plugin.

The problem is, I'm using this on Wordpress, and whenever I enable NextGen gallery, it enqueues the old Cycle plugin, which fails.

Is there a way to use both on the same page, or at least remove NextGen's Cycle and make a compatibility shim to make it use Cycle2?


Solution

  • It's easy... just replacing the "cycle"s with cycle2 in the Cycle2 source code, makes it usable with

    $(something).cycle2({options...})
    

    It's that easy - I don't see why they don't have a cycle2 namespaced version on the site for old cycle compatibility.