Once created driven by our AdServer, the texts will change based on established parameters (Geolocation, weather, date/time, cookies, retargeting…).
To dynamize texts you have 2 methods at your service :
The setText function allows you to insert a text in an element. It also offers the option to automatically adjust the text size to fit its container.
ADventori.Display.setText(element, data, minFontSize);
This function needs the following parameters:
To align the text within its container, ADventori’s CSS will handle the alignment automatically when you apply one of the following classes:
The adaptText function allows you to adapt the text size to its container.
ADventori.Display.adaptText(element, minFontSize);
This function needs two parameters:
The HTML tag targeted by this function must be a block element and have the following CSS properties: width, height, font-size, line-height.
To use the adaptText method, the container which uses this method can’t use the CSS property display:none (please use opacity:0;visibility:hidden;).