Skip to content

Commit

Permalink
Simplify js code to activate tab on external link click.
Browse files Browse the repository at this point in the history
  • Loading branch information
tangar76 committed Feb 2, 2022
1 parent 1fd3a93 commit d3a5d94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion view/frontend/web/js/tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ define([
anchor = anchor === 'review-form' ? 'reviews' : anchor;
$('[data-role="content"]', me.element).each(function (index) {
if (this.id === anchor) {
me.element.tabs('activate', index);
me.activate(index);
_scrollAnimated($(this));
event.preventDefault();
event.stopImmediatePropagation();
Expand Down

1 comment on commit d3a5d94

@tangar76
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit solves js error cannot call methods on tabs prior to initialization; attempted to call method 'activate'.

Error caused by Aheadworks_StoreCredit/js/aw-store-credit-ajax.js. It uses obsolete 'jquery/ui' as requirement. Browser shows warning regarding it in console.

Please sign in to comment.