Hi tom,
thank you for your hints.
My theme is a child of Quark 2.0.3
I managed to import the js from bfintal via base.html.twig
like so:
{% block javascripts %}
...
{% do assets.addJs('theme://js/site.js', {group:'bottom'}) %}
{% do assets.addJs('theme://js/waypoints.min.js') %}
{% do assets.addJs('theme://js/jquery.countUp.min.js') %}
{% endblock %}
I then created a new modular copying from modular/features.html.twig and also gave it a blueprint.
I got things up and running by calling the count function in site.js
jQuery(document).ready(function ($) {
// Count Up for Counters
$('.counter').counterUp({
delay: 50,
time: 2000
});
});
And it worked well. They counted up each time the pages was refreshed.
After that i was wondering if i could influence each individual counter ind “delay” and “time” via a value given in the admin backend defined via blueprint.yaml
How can i get the values from the backend into the site.js Javascript file in order to handle it in the function?