Skip to content

Commit

Permalink
Merge pull request #455 from deeepvision/v3.362-custom-jquery
Browse files Browse the repository at this point in the history
Add alternative version of jQuery (2.2.4)
  • Loading branch information
designerbrent authored Aug 5, 2020
2 parents 37a5d45 + 951253c commit b5fd4d7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions source/js/script.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
/* MAIN JS
--------------------------------------------*/

/**
* Hotfix for ALPS Wordpress Theme
* Wordpress has jQuery v1.12.4 bundled. Global version must not be changed due to big amount of WP Plugins.
* To allow usage jQuery v2.2.4 for ALPS blocks, the $jq2 variable is created with alternative version.
* This version is injected into ALPS JS Script
*/
var alpsJQueryRef = jQuery;
if ($jq2) {
alpsJQueryRef = $jq2;
}

(function($) {

// BASE SETUP ------------------------------------//
Expand Down Expand Up @@ -478,8 +489,7 @@
$(this).toggleClass('active');
});

})(jQuery); // Fully reference jQuery after this point.

})(alpsJQueryRef); // Fully reference jQuery after this point.

// Overwrites native 'firstElementChild' prototype.
// Adds Document & DocumentFragment support for IE9 & Safari.
Expand Down

0 comments on commit b5fd4d7

Please sign in to comment.