Animating popups using custom css animation

I have been able to modify the modal windows to use a custom animation. I was wondering if there is a proper way to do the same with popup windows?

The only way I found was to add a class to the popup div onload using javascript… Something like

<div class="popup animate bounce">

Is there a better way?