This support ticket is created vor 6 Jahren. There's a good chance that you are reading advice that it now obsolete.
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.
I don't see any particular issue with your JS code (assuming it doesn't create any visual glitch as the page loads).
In your initial post you showed using a wpv-conditional shortcode.
You can use the custom taxonomy shortcode I provided as a condition (provided you registered it at Toolset > Settings > Front-end Content), but you need to use the shortcode correctly.
Here is a reminder of some of the ways you can use it:
[taxonomy output='taxonomy'] -- outputs the taxonomy slug
[taxonomy] -- outputs the term name (default)
[taxonomy output='count'] -- outputs the count of results
[taxonomy output='field' field='wpcf-colour'] -- outputs a 'colour' taxonomy custom field
It looks like you want to output the term name, which means you can use just [taxonomy], or you might find the slug a safer option ([taxonomy output='slug']).