Jump to content
Fórum Script Brasil
  • 0

Popunder Cookies


jnt.reb
 Share

Question

Fala Pessoal,

Consegui montar um PopUnder, com gatilho no Onclick (Para fugir do  Anti Popup).

Então ficou assim:

No Head:
    (function($) {
        $.popunder = function(sUrl) {
            var _parent = self;
            var bPopunder = !($.browser.mozilla && $.browser.version >= '2.0');
            
            if (top != self) {
                try {
                    if (top.document.location.toString()) {
                        _parent = top;
                    }
                }
                catch(err) { }
            }
            
            var popunder = _parent.window.open('about:blank', 'pu_' + Math.floor(89999999*Math.random()+10000000), 'toolbar=0,scrollbars=1,location=1,statusbar=1,menubar=0,resizable=1');
            if (popunder) {
                popunder.blur();
                if (bPopunder) {

                    popunder.location = sUrl;
                    _parent.window.blur();
                    _parent.window.focus();
                    try { opener.window.focus(); }
                    catch (err) { }
                }
                else {
 
                    popunder.init = function(e) {
                        with (e) {
                            (function() {
                                if (typeof window.mozPaintCount != 'undefined') {
                                    var x = window.open('about:blank');
                                    x.close();
                                }
    
                                try { opener.window.focus(); }
                                catch (err) { }
                                window.location = e.params.url;
                            })();
                        }
                    };
                    popunder.params = {
                        url: sUrl
                    };
                    popunder.init(popunder);
                }
            }
            
            return this;
        }
    })(jQuery);
 

E o gatilho no Body:

<body onclick="jQuery.popunder('http://www.sitedopopup.com.br')">

 

Preciso incluir no código, algo para controlar o Cookies, a intenção não é que abra em todos os cliques..evitando a chatice...

Deve abrir em um determidado intervalo.

 

alguém pode ajudar?

 

Valeu

 


   

Link to comment
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

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.9k
    • Total Posts
      646.8k
×
×
  • Create New...