cocoon icon indicating copy to clipboard operation
cocoon copied to clipboard

Fix jQuery deprecation issue

Open vilius opened this issue 7 years ago • 2 comments

Uses $() syntax instead $(document).on("ready") which removes deprecation warning as of jQuery 1.8 and fixes the script for jQuery 3, where the method is removed.

See: https://jquery.com/upgrade-guide/3.0/#breaking-change-on-quot-ready-quot-fn-removed https://api.jquery.com/ready/#entry-longdesc

vilius avatar Aug 16 '17 10:08 vilius

Thank you for your work (and fixing the documentation :+1: :clap: :clap:). But if possible, I prefer to maintain backward compatibility. So not sure what the best approach is to achieve that, and if it is possible.

nathanvda avatar Aug 16 '17 10:08 nathanvda

Hi there: I would want to merge this, but you have not yet updated the code as you mentioned in your last comment, which looks just fine (sorry I forgot to reply back to you earlier).

Also, with regards to the documentation you are confused: the synthetic event ready is deprecated, but not the ready() call, it is still supported, see https://api.jquery.com/ready/ so the README is correct (and I prefer the more verbose version, so the documentation as it is now). So I would love to merge this if it only contained the code-change as discussed before.

nathanvda avatar Nov 30 '17 17:11 nathanvda