Jump to:

23486 Posts in 18995 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Jquery slideshow conflict

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1713 Views
  • stevanovich
    Avatar
    Community Member
    60 Posts

    Jquery slideshow conflict Link to this post

    I have set up a slide show on all pages which takes images from special offers pages and lets them click through to the offer. All works fine apart from the userform contact page.

    I am using hard links at the moment to js docs and the function below before I download and set up on live server.

    The I notice the userform uses jquery, is this conflicting with the jquery in the slideshow. How do I get around this issue?

    <!-- include jQuery library -->
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script>
    <!-- include Cycle plugin -->
    <script type="text/javascript" src="http://cloud.github.com/downloads/malsup/cycle/jquery.cycle.all.latest.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    $('.slideshow').cycle({
          fx: 'scrollUp' // choose your transition type, ex: fade, scrollUp, shuffle, etc...
       });
    });
    </script>

  • Willr
    Avatar
    Forum Moderator
    5508 Posts

    Re: Jquery slideshow conflict Link to this post

    You should use the <% require %> syntax to require files to prevent duplication. UDF will include the jquery from sapphire so for your slideshow you can do

    <% require javascript(sapphire/thirdparty/jquery/jquery.js %>

    Which will prevent duplication of the library inclusion. Or you can block the one UDF uses and Require the one off the google api

    http://doc.silverstripe.org/requirements

  • Kimbonz
    Avatar
    Community Member
    1 Post

    Re: Jquery slideshow conflict Link to this post

    I am having a similar problems with a Jquery slideshow, I would like to know Will where your solution above is positioned? Should this be in the Page.ss file? I have tried this file location without success. My slide show works well on all pages except pages that have a form.

    Frustrating

    1713 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.