ziedinjsh Posted March 13, 2015 Report Share Posted March 13, 2015 Sveiki! Es te cīnos, bet īsti nesanāk panākt vēlamo. Nospiežot pogu kas sumbito formu caur jquery/ajax pie response notiek darbība.Šinī gadījumā: ja div (.message) nav redzams un parādās ar css animāciju, bet ja ir redzams notiek cita animācija, bet brīdī kad viņš ir parādījies un pēc otrās animācijas (otro reizi nospiežot submit pogu) vairs nevar panāk lai viņš rāda animāciju atkārtoti! JS: if(response){ if($('.message').is(':visible')){ $('.message').removeClass('tada').addClass('shake'); $('message').toggleClass('shake'); }else{ $('.message').addClass('tada').html(response).show(); } } Quote Link to comment Share on other sites More sharing options...
briedis Posted March 13, 2015 Report Share Posted March 13, 2015 $('message') Kur punkts? (~5s pamanīju) Quote Link to comment Share on other sites More sharing options...
ziedinjsh Posted March 14, 2015 Author Report Share Posted March 14, 2015 Ok, bet nestrādā vienalga Quote Link to comment Share on other sites More sharing options...
briedis Posted March 14, 2015 Report Share Posted March 14, 2015 Uztaisi jsfiddle piemēru, kur nestrādā. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.