Support for latest Jquery 3.x (error : Object doesn't support method 'IndexOf')

1 reply · opened May 21, 2017

AawbmansourMay 21, 2017

We have recently purchased a license for Canvas: themeforest-9228123-canvas-the-multipurpose-html5-template

How can we make your template to support latest JQuery 3.x instead of the bundled in jQuery v1.12.4 ?

When we try to do that, we receive the following error:

$(document).ready(SEMICOLON.documentOnReady.init);

$window.load(SEMICOLON.documentOnLoad.init);

Unhandled exception at line 9793, column 3 in http://localhost:58609/Scripts/jquery-3.1.1.js
0x800a01b6 - JavaScript runtime error: Object doesn't support property or method 'indexOf'

$window.on('resize', SEMICOLON.documentOnResize.init);

SSemicolon WebSTAFFMay 24, 2017

Hello,

Unfortunately, Canvas currently does not support jQuery 3.x since there are some plugins included within Canvas that still does not support the Latest Version of jQuery. However, the error you are getting an definitely be solved, so simply find the following code in the js/functions.js File:

$(document).ready( SEMICOLON.documentOnReady.init );
$window.load( SEMICOLON.documentOnLoad.init );

and replace it with:

$(document).on( 'ready', SEMICOLON.documentOnReady.init );
$window.on( 'load', SEMICOLON.documentOnLoad.init );

This should fix the issue. Hope this Helps! We are surely working on making Canvas compatible with the Latest jQuery and will release an Update soon.

Let us know if we can help you with anything else or if you find any further issues.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard