Skip to content

Instantly share code, notes, and snippets.

@pauloiankoski
Last active December 20, 2015 18:39
Show Gist options
  • Save pauloiankoski/6177341 to your computer and use it in GitHub Desktop.
Save pauloiankoski/6177341 to your computer and use it in GitHub Desktop.
Sistema de Popup simples completo
<div id="popup" style="">
<a href="#" class="hidepopup">Fechar</a>
<?php //<a href="http://www.consorciosdahyundai.com.br/carros/"> ?>
<img src="<?php pauloimages('splash.jpg'); ?>">
<?php //</a> ?>
</div>
<div class="overlaysplash"></div>
<style type="text/css">
.overlaysplash {
background: rgba(0,0,0,0.75);
position: fixed;
width: 100%;
height: 100%;
top: 0;
z-index: 100;
}
#popup {
top: 50%;
left: 50%;
padding: 20px;
display: block;
position: fixed;
margin-left: -350px;
margin-top: -127px;
z-index: 9999;
}
#popup .hidepopup {
background: white;
border-radius: 25px;
padding: 5px;
position: absolute;
right: 0;
top: 0;
border: 1px solid #333;
font-size: 12px;
color: red;
font-weight: 800;
}
</style>
<script type="text/javascript">
jQuery(document).ready(function($){
$('#popup').show('bounce', { times:3 }, 300);
$('.showpop').hide();
$('.hidepopup').click(function(){
$('#popup').slideUp();
$('.overlaysplash').fadeOut();
return false;
});
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment