Since you are using both JavaScript the annotation and JavaScript, you’ll need to use the full path on one of them to differentiate between the two.
Hope that helps.
thank you again. I didn’t understand what exactly you were talking about when you explained it in the other thread. Now I fixed it like below. Hopefully, this is correct. At least no complains from Eclipse.
Indeed, I was hoping for the HTML-element. I’ve tried Jouni’s Animator a few days ago. I couldn’t find too much information about the different functions I can use with the Animator, so I thought I just go with jQuery. Anyway, since my goal for now is to animate some components, I want to try the Animator again.
This is what I did a couple of days ago:
public void buttonClick(ClickEvent event) {
Animator.animate(mainLayout, new Css().opacity(0.3));
Animator.animate(mainLayout, new Css().translateX(“100px”)).delay(1000).duration(2000);
mainLayout.addComponent(nbtn_insert2);
This code results in the button
suddenly disappearing after clicking it.
Without this line : mainLayout.addComponent(nbtn_insert2); , nothing happens when clicking the button. It doesn’t disappear, but nothing happens.
Sure, that will work, but it will also animate every single label in your application, probably not what you want. If you want to go that route, you’ll want to call addStyleName() on your component to give it a unique classname that you can target.