Total Complexity | 3 |
Complexity/F | 1.5 |
Lines of Code | 17 |
Function Count | 2 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | 'use strict'; |
||
2 | |||
3 | $(document).ready(function () { |
||
4 | |||
5 | let currentUrl = window.location.href; |
||
6 | |||
7 | $('.sidebar .nav-item').each(function () { |
||
8 | |||
9 | let sidebarLink = $('a', this).attr('href'); |
||
10 | |||
11 | if (currentUrl.indexOf(sidebarLink) !== -1) { |
||
12 | $(this).addClass('active'); |
||
13 | } |
||
14 | |||
15 | }); |
||
16 | |||
17 | }); |
||
18 |