Skip to content
Snippets Groups Projects
Commit 2416be1b authored by 吴 可's avatar 吴 可 Committed by Shelane French
Browse files

Issue #3376764 by murphyW: $.cookie is not a function in drupal10 quicktabs

parent 1300e30c
Branches 1.x
Tags 1.1.4
No related merge requests found
(function ($, Drupal, drupalSettings, once) {
(function ($, Drupal, drupalSettings, once, cookies) {
'use strict';
......@@ -137,7 +137,7 @@ Drupal.quicktabs.tab = function (el) {
$link.data('myTabIndex', i);
// Click the tab ID if a cookie exists.
var $cookieValue = $.cookie(cookieName);
var $cookieValue = cookies.get(cookieName);
if ($cookieValue !== '' && $link.data('myTabIndex') == $cookieValue) {
$(element).click();
}
......@@ -147,7 +147,7 @@ Drupal.quicktabs.tab = function (el) {
$link.on('click', function () {
var $linkdata = $(this);
var tabIndex = $linkdata.data('myTabIndex');
$.cookie(cookieName, tabIndex, cookieOptions);
cookies.set(cookieName, tabIndex, cookieOptions);
});
});
});
......@@ -202,4 +202,4 @@ if (Drupal.Ajax) {
};
}
})(jQuery, Drupal, drupalSettings, once);
})(jQuery, Drupal, drupalSettings, once, window.Cookies);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment