Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

[SOLVED] - Using JQuery > 1.7?


Go to End


3 Posts   815 Views

Avatar
richardtallent

Community Member, 5 Posts

26 May 2014 at 6:55pm

In my quest to create pages with large scanned documents (JPEG files), I've found a Javascript library I'd like to use for panning and zooming these large images:

https://github.com/timmywil/jquery.panzoom

Unfortunately, it requires JQuery 1.9.x or 2.x, and SilverStripe still appears to rely on 1.7.x.

I've tried blocking the Sapphire version from my page controller and replacing it with a later version of JQuery. This fixed the SCRIPT tag, but there's still some code in the Simple template that is trying to access the "$.browser" attribute, which was deprecated a long time ago and finally removed in 1.9.

Do I have any options here? Is SS planning to upgrade to a more recent version of JQuery any time soon?

Avatar
Devlin

Community Member, 344 Posts

26 May 2014 at 8:16pm

Edited: 26/05/2014 8:16pm

We strongly recommend that you also use the jQuery Migrate plugin if you are upgrading from pre-1.9 versions of jQuery or need to use plugins that haven't yet been updated.
...
The plugin restores deprecated features and behaviors so that older code will still run properly on jQuery 1.9 and later.

http://jquery.com/download/#jquery-migrate-plugin

Avatar
richardtallent

Community Member, 5 Posts

27 May 2014 at 4:25am

Perfect, thanks!

Looks like I have the start of a decent template now:

http://history.tallent.us/research/1790-us-census/1790-census-nc-anson-p3/

--Richard