Skip to content

Commit 774ee7c

Browse files
pricing script moved from pricing-main-row.html to main.js file (#806)
1 parent e7fc2d0 commit 774ee7c

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

assets/js/main.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8983,3 +8983,21 @@ function generateUUID() {
89838983
return (c === "x" ? r : (r & 0x3) | 0x8).toString(16);
89848984
});
89858985
}
8986+
8987+
/* Pricing page */
8988+
$(document).ready(function () {
8989+
if ($('body').hasClass('pricing')) {
8990+
$('.grid-container').each(function () {
8991+
var container = $(this);
8992+
var tooltip = container.find('.table-tooltip');
8993+
8994+
container.on('mouseenter', function () {
8995+
tooltip.css('display', 'block');
8996+
});
8997+
8998+
container.on('mouseleave', function () {
8999+
tooltip.css('display', 'none');
9000+
});
9001+
});
9002+
}
9003+
});

pages/pricing/_pricing-main-row.html

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,3 @@
3939
<hr class="with-margin" />
4040
{% endfor %}
4141

42-
<script>
43-
document.addEventListener('DOMContentLoaded', function () {
44-
const containers = document.getElementsByClassName('grid-container');
45-
46-
for (let i = 0; i < containers.length; i++) {
47-
const container = containers[i];
48-
const tooltip = container.querySelector('.table-tooltip');
49-
50-
container.addEventListener('mouseenter', function () {
51-
tooltip.style.display = 'block';
52-
});
53-
54-
container.addEventListener('mouseleave', function () {
55-
tooltip.style.display = 'none';
56-
});
57-
}
58-
});
59-
</script>

0 commit comments

Comments
 (0)