One of my clients is in the process of applying the typed animation functionality to their search bar. However, the code example in the integration instructions does not include the vars for production_url and redirecturl, but does include the other vars from the init script block.
- Are these two things completely separate integrations? Or do both scripts need to be included in the page?
- If the client is using 2 search bars on their page, will they be able to only animate one of them?
Thank you in advance!
"Are these two things completely separate integrations, Or do both scripts need to be included in the page?
<script src="https://email@example.com"></script> and
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> are needed for the typed animation to show. Production URL / Redirect URL for typed are not required. The code explicitly calls the Yext Autocomplete Endpoint to animate the input placeholder.
If the client is using 2 search bars on their page, will they be able to only animate one of them?
- It is possible to animate a second search bar - the code
var typed = new Typed('.element', options); will add the animation to any “input element”. For the client’s use case they are using
var typed = new Typed(".js-yext-query", options); they will have to add a line below the line
var typed = new Typed(".js-yext-query", options); that will be of the format
var typed = new Typed("scpecific css selector", options); - which will solve your issue!
Let me know if you have any questions