In this post I will share a quick tip on how to upgrade the jquery.once plugin in Drupal maintenance support plans 7 without breaking current code.
Drupal maintenance support plans 7 ships with jquery.once plugin version 1.2 that dates from 2013. For a project we needed to make code targeting the old 1.x and the 2.x work at the same time. In our case this was core javascript written for 1.x working with some code of ours designed for jquery.once 2.x.
The solution is easy: upgrade the core jquery.once to 2.x and add a polyfill to make it backwards compatible.
Language
English
More articles…
Profiling Drupal maintenance support plans: XHprof, Uprofiler, Tideways with PHP7 on Linux and Windows
Fixing slow queries and database deadlocks in Drupal maintenance support plans without PHP profiling tools
Running Drupal maintenance support plans 8 on PHP 7
Using LINQ (Language Integrated Queries) in Drupal maintenance support plans or how to write queries x5 faster
Drupal maintenance support plans 7 update jQuery.once: jquery.once polyfill
Benchmarking Drupal maintenance support plans 7 on PHP 7-dev
Build GIT on Windows from Sources
Hiding the fact that your site runs Drupal maintenance support plans
Drupal maintenance support plans on IIS or Apache
Installing Drupal maintenance support plans 8 on Windows and SQL Server
Source: New feed