16 October 2013 at 10:52am
(Last edited: 16 October 2013 10:55am),
I'm just at the point of completing my first Responsive design theme for Silverstripe.
In order to enable a Lightbox function for the client's products I have to call upon a version of jquery.min.js. And in order to have a functional, fold-away two-level navigation bar that works on smartphone screens I need a different version of jquery.min.js.
• The version of jquery for the navbar function is 1.9.1
• The version used for the lightbox (included in SilverStripe Third Party directory) is 1.7.2
I understand that it is possible to use jquery.noConflict to eliminate conflicts between different version of jQuery. Unfortunately when I use a script to implement this at the base of Page.ss all functionality stops on both jQuery calls.
These scripts are obviously mutually exclusive. Has anybody else struck these issues? How did you fix it?
16 October 2013 at 3:46pm
Can you only include the 1.9.1 version? Rip out the use of 1.7.2
You don't want to include two versions of jquery. No conflict is only to relinquish the use of $ sign which other frameworks may try to claim for there own use. As you've discovered they won't play nice together.
16 October 2013 at 4:36pm
Thanks for your comment Bambii7 -- I did try this. I also tried updating the version of jquery.min.js that is included with SilverStripe. Unfortunately when I did this I lost the PrettyPicture lightbox function, which seems to want to run only on jQuery.min.js v 1.7.2...
18 October 2013 at 8:48am
Actually I went the other way. As I couldn't see a way to resolve the conflict I found a Responsive Navbar script at [url]http://webdesign.tutsplus.com/tutorials/site-elements/big-menus-small-screens-responsive-multi-level-navigation/[/url] that used jQuery 1.7.2 and used that instead. Much simpler!