Css animation not working

0
My page consists out of 2 elements: A template grid that has datasource database. Dataview that has datasource: listen to widget (= template grid)   in the datagrid i have a container with some text in it. On this container i have set a animation using css. But this animation only  triggers when the page is opened. So when i select another object from the template grid the animation doesn’t trigger. Any thoughts on how to solve this?
asked
2 answers
0

Nice! An animation in Mendix. Love them. So you need a trigger. What currently triggers the animation? Just the normal pageload? You can add an HTML-widget on the page, use that to trigger an javascript, have that javascript add an onChange-function to the DOM-element that contains the animation. You will however need to understand javascript how to select the Dom-element, but examles will get you there.

answered
0

Hi Tim,
$('.clickthis').click(function() {
     $(".targetthis").toggleClass("toggleclass");
});

I got this code from another post. I've put a container inside the templategrid (class="triggerTest). Next on my text in the dataview i've set a class "HeaderTest". The css class to be triggered is also called "HeaderTest". So the code should be:
$('.triggerTest').click(function() {
      $(".HeaderTest").toggleClass("HeaderTest");
});

However it doesn't seem to work...
This code was aded in an Html-snippet (using the javascript option).

answered