Compatibility with jQuery v1.9+

Anonymous avatarAnonymous created an issue

jqplot is not compatible with jQuery v1.9.0 (Released yesterday).

Example of errors:

Uncaught TypeError: Cannot read property 'msie' of undefined jquery.jqplot.min.js:57 Uncaught TypeError: undefined is not a function jqplot.barRenderer.min.js:57 Uncaught TypeError: undefined is not a function jqplot.logAxisRenderer.min.js:57 Uncaught TypeError: Cannot call method 'push' of undefined jqplot.highlighter.min.js:57 Uncaught TypeError: undefined is not a function jqplot.dateAxisRenderer.min.js:57 Uncaught TypeError: undefined is not a function jqplot.categoryAxisRenderer.min.js:57 Uncaught TypeError: Object [object Object] has no method 'live'

Comments (4)

  1. jbogdani

    The $.browser and .live() are deprecated in jQuery 1.9.0.

    I fixed it temporary by removing reference to $.browser, around line 398.

    // replaced this:
    //$.jqplot.use_excanvas = ($.browser.msie && !$.jqplot.support_canvas()) ? true : false;
    // with
    $.jqplot.use_excanvas = ((!$.support.boxModel || !$.support.objectAll || !$support.leadingWhitespace) && !$.jqplot.support_canvas()) ? true : false;
    

    Looking forward for the final solution

  2. Radium3D

    I too fixed this issue by simply changing the reference to $.browser.msie to $.support.boxModel in jquery.jqplot.min.js as stated by jbogdani above.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.