Total Complexity | 8 |
Complexity/F | 1.33 |
Lines of Code | 28 |
Function Count | 6 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | import $ from 'jquery' |
||
2 | |||
3 | $(document).ready(function () { |
||
4 | var waitForEl = function (selector, callback) { |
||
5 | if ($(selector).length) { |
||
6 | callback() |
||
7 | } else { |
||
8 | setTimeout(function () { |
||
9 | waitForEl(selector, callback) |
||
10 | }, 100) |
||
11 | } |
||
12 | } |
||
13 | |||
14 | if ($('[data-layout="BlockCountUp"]').closest('.values').length) { |
||
15 | waitForEl('i[data-feather]', function () { |
||
16 | $('i[data-feather]').closest('.select2-selection__rendered').removeAttr('title') |
||
17 | window.feather.replace() |
||
18 | }) |
||
19 | } |
||
20 | |||
21 | $('body').on('click focusin', '.select2-container', function () { |
||
22 | window.feather.replace() |
||
23 | }) |
||
24 | |||
25 | $('body').on('keyup', '.select2-search__field', function () { |
||
26 | window.feather.replace() |
||
27 | }) |
||
28 | }) |
||
29 |