How can I make make the class of an entry link "active" if entry is the current url?
You don't need to use Javascript/jQuery for this.
You can get the the current url from craft.app.request in some way and do a check as you output your navigation.
It looks like you have some custom fields for urls but, For instance, if you wanted to check the last url segment you could use craft.app.request.segment(-1) to get it. Then when outputting your css classes, check it against whatever and output the active class.
{% set currentPage = craft.app.request.segment(-1) %}

then in your loop...

&lt;li class=&quot;{{ thisUrl == currentPage ? 'active ' }} otherclasses&quot;&gt;
    &lt;a href=&quot;{{ foo }}&gt;Some title&lt;/a&gt;
&lt;/li&gt;

You can also get the full URL with {{ craft.app.request.absoluteUrl }}
Or {{ craft.app.request.pathInfo }} to get the path