ericakfranz
12/7/2015 - 10:21 PM

Animate the error messages displayed each time they're triggered.

Animate the error messages displayed each time they're triggered.

jQuery(document).ready( function($){
    $(document).on('OptinMonsterOnError', function(event, data, object){
      var l = 20;
      for( var i = 0; i < 10; i++ )
      $( ".optin-monster-error" ).animate( { 'margin-left': "+=" + ( l = -l ) + 'px' }, 50);
    });
});