PluginProbe
King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder / 51.1.49
King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder v51.1.49
51.1.83 51.1.82 51.1.81 51.1.79 51.1.78 51.1.77 51.1.76 51.1.74 51.1.75 51.1.65 51.1.64 51.1.63 trunk 51.1.14 51.1.2 51.1.35 51.1.36 51.1.37 51.1.38 51.1.39 51.1.44 51.1.45 51.1.46 51.1.47 51.1.49 All 37 releases
king-addons / includes / widgets / Review_Schema / script.js

script.js in King Addons for Elementor – 80+ Elementor Widgets, 4 000+ Elementor Templates, WooCommerce, Mega Menu, Popup Builder 51.1.49, at includes/widgets/Review_Schema/script.js

38 lines 879 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 "use strict";
2
3 (function ($) {
4 const shouldShow = ($el) => {
5 const device = $el.data("device") || "all";
6 if (device === "all") return true;
7 const isMobile = window.matchMedia("(max-width: 767px)").matches;
8 if (device === "mobile") return isMobile;
9 if (device === "desktop") return !isMobile;
10 return true;
11 };
12
13 const initReviewSchema = ($scope) => {
14 const $wrap = $scope.find(".king-addons-review");
15 if (!$wrap.length) return;
16
17 if (!shouldShow($wrap)) {
18 $wrap.hide();
19 }
20 };
21
22 $(window).on("elementor/frontend/init", function () {
23 elementorFrontend.hooks.addAction(
24 "frontend/element_ready/king-addons-review-schema.default",
25 function ($scope) {
26 initReviewSchema($scope);
27 }
28 );
29 });
30 })(jQuery);
31
32
33
34
35
36
37
38