Skip to content

Instantly share code, notes, and snippets.

@felipegenuino
Created April 13, 2016 08:17
Show Gist options
  • Save felipegenuino/d8439d7506c7e6b4af595ec781c884d5 to your computer and use it in GitHub Desktop.
Save felipegenuino/d8439d7506c7e6b4af595ec781c884d5 to your computer and use it in GitHub Desktop.
Funcão para exibir mensagem do contact form 7
.wpcf7-response-output.wpcf7-mail-sent-ok {
display: inline-block;
padding: 20px 10px;
text-align: center;
width: 100%;
background-color: #2E5E94;
color: #fff;
position: fixed;
top: -70px;
left: 0;
z-index: 1000;
transition: all 0.2s;
}
.wpcf7-response-output.wpcf7-validation-errors {
display: inline-block;
padding: 20px 10px;
text-align: center;
width: 100%;
background-color: red;
color: #fff;
position: fixed;
top: -70px;
left: 0;
z-index: 1000;
transition: all 0.2s;
}
$(function(){
function remove_mensage(){
$(".wpcf7-response-output.wpcf7-validation-errors").css('top','-80px');
};
function show_mensage(){
$(".wpcf7-response-output.wpcf7-validation-errors").css('top','0px');
};
window.setTimeout( show_mensage, 1000 ); // 1 seconds
window.setTimeout( remove_mensage, 10000 ); // 5 seconds
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment