Initialising custom script in ALL tabs

Hi, I am trying to truncate my titles using a script in my tabbed content. It works well but it seems it’s only working for the first active tab. The script doesn’t seem to take effect on the rest of the tab.
Any solutions out there?

Well you can create a div block with a class in every tab, put your content there and then target the class.

If you post a read only link to your project and the script that you are using I might be able to help you.

This is the script I placed in the custom code section of the page:

<!-- shave.js - truncates text -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/shave/2.5.7/shave.min.js" integrity="sha256-DHOTIzlEJ2trgv0MBX+fRbkCVUxEGOmP2zp3f8JAtGQ=" crossorigin="anonymous"></script>

<!-- shave.js - Initialization -->
<script>
  shave('.truncate', 20);
</script>

And basically call the truncate selector for the text like below. It works but only for the first tab. The rest of the tabs, doesn’t seem to apply.

Here’s the project link:
https://preview.webflow.com/preview/fschool?utm_medium=preview_link&utm_source=designer&utm_content=fschool&preview=cc4a81eab2b6ec0bf0c89ffafb054539&pageId=5e884c8cbcf6e1462cbff82b&mode=preview

Screenshot 2020-04-06 at 2.33.55 PM