Jump to content
Fórum Script Brasil
  • 0

Preciso que quando clicar no x abra uma pagina_blank e feche o que aparece na tela deixando apenas o site


lourivalalves
 Share

Question

Amigos o que eu preciso é o seguinte que quando a pessoa entra no site e aparece esse script que nada mais é do que um script no qual a pessoa quando clica no X ela esta clicando na verdade em um anuncio do google adsense, porem o problema é que quando ela clica no X ela sai da pagina e a pessoa tem que retornar para o site novamente para poder ver a postagem, ou seja... não é 100%eficaz, gostaria que fosse como um adsense do egrana que joga por tras o anuncio ou seja abre uma nova janela no navegador e a pessoa podera continuar no site sem problemas. 

<script src='http://yourjavascript.com/01114252230/jquery-min.js'></script>
<script src="http://yourjavascript.com/18530532124/jquery-colorbox-min.js"></script>
<script type="text/javascript">
function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*2*60*60*1000));        
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}
function readCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for(var i=0;i < ca.length;i++) {
        var c = ca;
        while (c.charAt(0)==' ') c = c.substring(1,c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
}
function eraseCookie(name) {
    createCookie(name,"",-1);
}
jQuery(document).ready(function() {
    var visited = readCookie('visited');
    if (!visited || visited !== "true") {
        createCookie('visited', "true", 1);
        $.colorbox({width:"400px", inline:true, href:"#subscribe"});
    }
});
</script>
<script type="text/javascript" src="http://yourjavascript.com/14222701305/google-jquery-min.js"></script>
<script type="text/javascript">
// JavaScript Document
 var $q = jQuery.noConflict();
$q(document).ready(function()
{
$q("#lightbox, #lightboxContent").click(function(){
$q("#lightbox, #lightboxContent").hide();
})});
</script>
<style type="text/css">
#lightbox {
    background-color: #000;
    float: left;
    height: 100%;
    opacity: 0.9;
    -moz-opacity: 0.90;
    filter: alpha(opacity=90);
    position: fixed;
    width: 100%;
    z-index:998;    
}   
 
#lightboxContent {
    background-image: url("http://i.imgur.com/M9CdWa9.png");
    background-repeat:no-repeat;
    margin: 0 auto;
    opacity: 997;
    padding-top: 30px;
    width: 331px;
    height: 343px;
    z-index:999;
    cursor:pointer;
    margin-left: -157px; /* metade da largura */
    margin-top: -145px; /* metade da altura */
    position: fixed;
    top: 50%;
    left: 50%;
    text-align: center;
}
#fechar {
z-index:10;
}
</style>
<style type="text/css">
<!--
#curtir {
z-index:998;
}
-->
</style>
<script language="JavaScript" type="text/javascript">
if (document.all){}
else document.captureEvents(Event.MOUSEMOVE);
document.onmousemove=mouse;
function mouse(e)
{
if (navigator.appName == 'Netscape'){
xcurs = e.pageX;
ycurs = e.pageY;
} else {
xcurs = event.clientX;
ycurs = event.clientY;
}
document.getElementById('position').style.left = (xcurs-150)+'px';
document.getElementById('position').style.top = (ycurs-125)+'px';
}
</script>
<style type="text/css">
<!--
#position {
position: absolute;
z-index:999999;
filter:alpha(opacity=0); 
opacity:0.0;
}
-->
</style>
<div style='display:none' mobile='no'>
<div id='subscribe' mobile='no'>
<div id="position">
<div id="samuellins">

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- anuncio-novo-3011 -->
<ins class="adsbygoogle"
     style="display:inline-block;width:300px;height:250px"
     data-ad-client="ca-pub-6284374807458452"
     data-ad-slot="1813327288"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

</div>
</div>
<div id="lightbox"></div>
<div id="lightboxContent"><div id="curtir"><iframe src="http://google.com" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:315px; height:290px;" allowtransparency="true" onclick="document.getElementByID('lightboxContent').style.display='none';"></iframe><div id="fechar" onclick="document.getElementByID('lightboxContent').style.display='none';"><b>Clique no X para fechar!</b></div></div></div>
</div></div>

Link to comment
Share on other sites

2 answers to this question

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Forum Statistics

    • Total Topics
      149.6k
    • Total Posts
      646.2k
×
×
  • Create New...