How to integrate Animation Js into Bss

Hello. Fairly new to Bootstrap Studio.

I’m trying to integrate Animation JavaScriot Library, Like Anime.js in Bss and Unfortunately, without Success. I tried to put the code in the Header and in the Costume Html Code But, it doesn’t seem to work.

can anyone give a step by step Manual to do so.

thanks for any help.

Please for sake of god provide more details cause no one will help you if youre saying vaguely, its too “general” description of your problem…

First of all make sure your script in javascript list is ordered properly after anime.js cause if its above anime.js it wont work

i imported Anime.js into javascript folder, and its order first.
i wrote the code on the header:

div ID is text

not working.
what am i doing wrong?

  1. In design tab right click on Javascript heading and “link external js”
    in the URL add “https://cdnjs.cloudflare.com/ajax/libs/animejs/3.2.1/anime.min.js

  2. For a test, drag in icon onto the page (for this example use the font awesome 5 star - or anything with a ‘far’ class)

  3. Back to the design tab, create a new javascript file

  4. Add the following to the js file

var elements = document.querySelectorAll(".far");

anime({
  targets: elements,
  translateX: 270,
});

this should now move the star 270px to the right when you preview in browser

1 Like

Im glad that you’re on the forums, I don’t have nerves for this :laughing:

2 Likes

I was on a very boring teams meeting, makes the time go faster :grinning:

1 Like

it worked. thank you very much.
simple answer to a simple question.

Haha, happens I guess :smiley: