Skip to main content

Recent Post

Kathai Sollukiren Vanga Youtube Channel

How To Add Popup Email Subscription Widget For Blogger


One Time Popup Email Subscription Widget For Blogger
Last Time we published How To Add Pop Up Email Subscription Form For Blogger Using Jquery. As I mentioned in the last post now we are going to see How To Add One Time Popup Email Subscription Widget For Blogger. This is a jQuery widget. this is the upgraded version of the previous widget. In the older version widget will open when the email icon is clicked but this widget makes the popup automatically and the popup will shown only once in a week. Now we can see How To Add The One Time Popup Email Subscription Widget For Blogger.



Add One Time Popup Email Subscription Widget

Adding jQuery plugin to the template:

As this widget based on jQuery plugin, First you need to have a jQuery Plugin in your Blog template.
Ignore this Step, If your Blog already have a jQuery plugin.
  • Add the below line of code before </head> tag.
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>

Adding Widget Code to blogger

These steps are to add the One Time Popup Email Subscription widget to your blog.
  1. Go to Layout >> Add A Gadget, then choose HTML/JavaScript
  2. Paste this code inside it.
    <style>
    #backgroundPopup{ display:none; position:fixed; _position:absolute; /* hack for internet explorer 6*/ height:100%; width:100%; top:0; left:0; background-color: transparent;       background:rgba(0, 0, 0, 0.5);z-index:999; }
    #popupContact{ display:none; position:fixed; _position:absolute; /* hack for internet explorer 6*/ height:350px; width:500px; background:#FFFFFF; border:4px solid #ddd; z-index:999; padding:8px; font-size:13px; }
    #popupContactClose{    background:url(https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVugTGU3hRxv1ymFmwAkt0tZzcx7yqPq-VLqOpD1JOue2Ks0PLxhHvxnCeha_uqDTqTv5GrgOqVhoHTWB2G9q792-CKf-Ze4fhtye14j6QGQRnM5GUkHzvh20O-2uCLWwbNrbePQaQL2fX/s1600/close.PNG) no-repeat;    width:25px;    height:29px;    display:inline;    z-index:3200;    position:absolute;    top:-15px;    right:-16px;    cursor:pointer;    text-indent: -99999px;}
    #description {    color: #AAAAAA;    font-family: times New Roman;    font-size: 25px;    font-style: italic;    line-height:30px; }
    #description img {    float: left;    height: 80px;    padding: 0 25px 0 10px;    width: 80px; }
    #btntfollowForm {  padding: 15px; }
    #btntfollowForm img {  border:none; }
    #btntfollowForm p {  margin: 0 0 10px;}
    #btntfollowForm input:not([type="checkbox"]){ width: 93%; margin-top: 10px;        margin-bottom: 20px; padding: 10px 5px 10px 25px;  border: 1px solid rgb(178, 178, 178); -webkit-appearance: textfield; -webkit-box-sizing: content-box;   -moz-box-sizing : content-box;       box-sizing : content-box; -webkit-border-radius: 3px;    -moz-border-radius: 3px;         border-radius: 3px; -webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;    -moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset;         box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.6) inset; -webkit-transition: all 0.2s linear;    -moz-transition: all 0.2s linear;      -o-transition: all 0.2s linear;   transition: all 0.2s linear; }
    #btntfollowForm input:not([type="checkbox"]):active,
    #btntfollowForm input:not([type="checkbox"]):focus{ border: 1px solid rgba(91, 90, 90, 0.7); background: rgba(238, 236, 240, 0.2); -webkit-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;    -moz-box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;         box-shadow: 0px 1px 4px 0px rgba(168, 168, 168, 0.9) inset;}
    #btntfollowForm .button input{    background: none repeat scroll 0 0 #3D9DB3;    border: 1px solid #1C6C7A;    border-radius: 3px 3px 3px 3px;    box-shadow: 0 1px 6px 4px rgba(0, 0, 0, 0.07) inset, 0 0 0 3px #FEFEFE, 0 5px 3px 3px #D2D2D2;    color: #FFFFFF;    cursor: pointer;    font-family: 'Arial Narrow',Arial,sans-serif;    font-size: 24px;    margin-bottom: 10px;    padding: 8px 5px;    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);    width: 30%;    float: right; }
    #btntfollowForm .button input:hover{    background: #4ab3c6; text-decoration: none; }
    #btntfollowForm .button input:active,
    #btntfollowForm .button input:focus{ background: rgb(40, 137, 154); position: relative; top: 1px; border: 1px solid rgb(12, 76, 87);   -webkit-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;    -moz-box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset;         box-shadow: 0px 1px 6px 4px rgba(0, 0, 0, 0.2) inset; }
    .btntFollowFooter {  color:#222;  text-align: center;    font: 10px Tahoma, Helvetica, Arial, Sans-Serif;    padding: 7px 0;    margin-top: 80px;    text-shadow: 0px 2px 3px #555;    position: absolute;    width: 500px; }
    .btntFollowFooter a {    color: #222;    text-decoration: none; }
    .btntFollowFooter a:hover {    color: #fff; }
    <!--[if lt IE 7]>
    #btnt-container a.btntCloseImg {    background:none;    right:-14px;    width:22px;    height:26px;     filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhVugTGU3hRxv1ymFmwAkt0tZzcx7yqPq-VLqOpD1JOue2Ks0PLxhHvxnCeha_uqDTqTv5GrgOqVhoHTWB2G9q792-CKf-Ze4fhtye14j6QGQRnM5GUkHzvh20O-2uCLWwbNrbePQaQL2fX/s1600/close.PNG',sizingMethod='scale'); }
    #btntfollowForm  input{ padding: 10px 5px 10px 32px;    width: 93%; }
    #btntfollowForm  input[type=checkbox]{ width: 10px; padding: 0;}
    <![endif]-->
    </style>
    <div id="backgroundPopup">
    <div id="popupContact">
    <a href="" id="popupContactClose">x</a>
    <div id="btntfollowForm">
    <img alt="Subscribe" border="0" float="center" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgAZy4qBVPjTIjO19ThTPbBqd_EbRCnZf9LIU03ukKKIXYlZkm9jqymVP9HR8wc5lsLHjknya7AmOET-rkryGKCFQ-wlfVaMxNqraKnLZBfhVIcJmd4y0xjHLFKHmGCOIds_k2Kq5DkFd11/s1600/Subscribe+Via+Email.PNG" />
    <div id="description">
    <img alt="email" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhvskrdAo8aj9XXse7qGBfiykkLLaCZKAKhW8HHDAx-pjDu_bNsiC6ODPfOt1dv1uEA84y7zj-7ULY3HQ8OaT3XYid0jPBjBIfSBOhaaKYwnhyjE-WkjgLMjVoIvHKCyczMM5L5m9z6lNKN/s1600/Mail.PNG" />Subscribe to our mailing list to get the updates to your email inbox...</div>
    <form action="http://feedburner.google.com/fb/a/mailverify" method="post" onsubmit="window.open('http://feedburner.google.com/fb/a/mailverify?uri=
    chandeepsblogtips', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true" target="popupwindow">
    <input name="email" placeholder="Enter Your Email..." required="required" type="text" /><input name="uri" type="hidden" value="
    chandeepsblogtips" /><input name="loc" type="hidden" value="en_US" />
    <div class="button">
    <input type="submit" value="Subscribe" /></div>
    </form>
    </div>
    <div class="btntFollowFooter">
    Delivered by <a href="http://feedburner.google.com/" target="_blank">FeedBurner</a> | powered by <a href="http://www.blogtipsntricks.com/" rel="dofollow" target="_blank">blogtipsntricks</a></div>
    </div>
    </div>


    <script src="http://yourjavascript.com/24315621361/jquery.cookie.js" type="text/javascript">
    </script>
    <script type="text/javascript">
         var popupStatus = 0;
    //this code will load popup with jQuery magic!
    function loadPopup(){
        //loads popup only if it is disabled
        if(popupStatus==0){
            $("#backgroundPopup").fadeIn("slow");
            $("#popupContact").fadeIn("slow");
            popupStatus = 1;
        }
    }

    //This code will disable popup when click on x!
    function disablePopup(){
        //disables popup only if it is enabled
        if(popupStatus==1){
            $("#backgroundPopup").fadeOut("slow");
            $("#popupContact").fadeOut("slow");
            popupStatus = 0;
        }
    }

    //this code will center popup
    function centerPopup(){
        //request data for centering
        var windowWidth = document.documentElement.clientWidth;
        var windowHeight = document.documentElement.clientHeight;
        var popupHeight = $("#popupContact").height();
        var popupWidth = $("#popupContact").width();
        //centering
        $("#popupContact").css({
            "position": "absolute",
            "top": windowHeight/2-popupHeight/2,
            "left": windowWidth/2-popupWidth/2
        });
        //only need force for IE6 
        $("#backgroundPopup").css({
            "height": windowHeight
        });
     
    }
    //CONTROLLING EVENTS IN jQuery
    $(document).ready(function(){
        if ($.cookie("anewsletter") != 1) { 
            //centering with css
            centerPopup();
            //load popup
            loadPopup(); 
        }     
        //CLOSING POPUP
        //Click the x event!
        $("#popupContactClose").click(function(){
            disablePopup();
            $.cookie("anewsletter", "1", { expires: 7 });
        });
        //Press Escape event!
        $(document).keypress(function(e){
            if(e.keyCode==27 && popupStatus==1){
                disablePopup();
                $.cookie("anewsletter", "1", { expires: 7 });
            }
        });
    });
    </script>
  3. Replace the code highlighted above with your feedburner username.
    The username for your feed can be found at the end of your feed URL.For example our feedburner URL is http://feeds.feedburner.com/chandeepsblogtips , with chandeepsblogtips as the username.
  4. Now save the widget and view your blog.

I hope you enjoyed this widget. Please share your views about the widget via comments!!! We love to here from you.

Comments

Popular posts from this blog

Best Blog Directory And RSS Submission Sites

The RSSTop55 is my personal selection of the best blog and RSS directories and search engines that you can find on the web. Over the years, I have spent so much time in updating and refining it that the original list has grown to feature almost 400 directories and search engines, which make up for a truly unique collection of venues that you can use to promote your website. Photo credit: juliengron Why this list is so valuable to you and what are its key advantages compared to other lists dealing with the same topic? The RSSTop55 is updated weekly. New directories are added and I check persistently whether some old directories have headed to the deadpool, changed topic of interest, become a spam site, etc., so that this collection remains always of high-value. All directories are briefly reviewed, so that you can have a quick glance at each one of them and evaluate immediately if a directory is a good promotional venue for your website or business, without spen...

Make Money Online: Anyone And Everyone

If you’re a blogger or a internet marketer or even a beginner then you already know that it’s POSSIBLE to make money online. And what’s interesting about it is that, there are a lot of ways to make money online – from selling ads, e-books, affiliate marketing, freelance writing, podcasting, consulting, designing, coding, etc. So I’m going to highlight some of those online income streams but don’t expect overnight success because creating an income stream requires a lot of work and patience. But if you are a beginner and clueless about where to start then this should help you to focus on that. If you have any trouble with any of these options then leave a comment below or you can e-mail me and I’ll do my best to find the best resource to help you. Make Money Online With Your Website Do you have a website or a blog? If so, then then selling advertisements is the easiest way to make money online. Since there are tons of ad networks on the Internet you have to m...

How To Submit Blogger Sitemap To Google Webmaster Tools

Hi all of my friends, (prem). Today I am telling you how to submit a sitemap to Google Webmaster tools. Before going to today's tutorial, some discussion about Google webmaster. Why you submit a sitemap? This is the question? I will tell you guys how this is effect on your tariff. Bloggers say, “If you are not on Google, you are almost invisible to the world”, yes this is rightly said because if your blog is not submitted to Google Webmaster tools, there is high tendency that all you blog post might not get indexed on Google search engine and this might make you become invisible to the world despite your hard work. My blog almost had 25% increase of traffic from Google after submitting my blog to Google Webmasters Tool, Indexed my new post quickly and improve crawl rate.