• Resolved ramesh.oct2

    (@rameshoct2)


    I find same plugin used with option of popup as search result, anyone can help me to get the same?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bryan Focht

    (@bfocht)

    Here is some CSS and javascript that we use on our site for the popup. You can either add these to your theme or use a plugin such as Scripts n Style to add the css and javascript to your own site.

    You can review this blog article on different ways to add javascript to your own site 3 ways to insert JavaScript into WordPress pages or posts.

    Also keep in mind that each theme is a little different and you may need to adjust the javascript and css to work for your site, but this should get you started.

    css code

    
    /**-------------------
     *SEARCH POPUP
     *--------------------**/
    #blackout {
        width: 100%;
        height: 100%;
        background-color: rgba(0,0,0,.75);
        z-index: 9999;
        position: fixed;
        top: 0;
        display: none;
    }
    #closePop {
        float: right;
        height: 25px;
        width: 25px;
        position: absolute;
        right: 0px;
        top: 0px;
        color: red;
        font-size: 25px;
        cursor: pointer;
    }
    #popResults {
        width: 60vw;
        height: auto;
        position: fixed;
        top: 180px;
        left: 20vw;
        background-color: rgba(255, 255, 255, 0.75);
        z-index: 99999;
        padding: 20px;
        min-width: 345px;
        display: none;
    }
    
    #popResults .domain-result {
        float: right;
        vertical-align: middle;
        padding: 10px 10px 0px 8px;
        width: 100%;
        min-width: 290px;
        border: 1px solid #e8e8e8;
    }
    .salePrice {
        font-size: 20px;
        font-family: Oswald;
        text-transform: uppercase;
        color: #2eb343;
    }
    .domain-name {
        font-size: 20px;
        font-family: Oswald;
        text-transform: none;
        color: #353535;
        float:left;
    }
    
    .purchase-info {
        float: right;
    }
    
    a.rstore-domain-buy-button.submit.button.select {
        margin-left:15px;
    }
    
    .rstore-disclaimer {
        clear: both;
    }
    
    .rstore-disclaimer pre {
        font-family: sans-serif;
        background: none;
        border: none;
        font-size: 10px;
        font-weight: 100;
        margin: 0px;
        padding: 0px;
        white-space: pre-wrap;
    }
    

    javascript code

    
    jQuery(document).ready(function($) {
      // build popup on body
       $('body').append($('<div/>').attr("id", "popResults").addClass(""));
       $('body').append($('<div/>').attr("id", "blackout").addClass(""));
       $('#popResults').append($('<div/>').attr("id", "closePop").addClass("").html("X"));
    
      //move domain search results on click
       $('.rstore-domain-search').on('click', '.rstore-domain-search-button',  function(){
         $('#blackout').fadeIn();
         $('#popResults').fadeIn();
         $('.result-content').fadeIn();
         $('#popResults').append($('.result-content'));
       });
    
      //remove search results and add the results div back to the search bar
       $('body').on('click', '#closePop, #blackout',  function(){
         $('#popResults').fadeOut();
         $('#blackout').fadeOut();
         $('.result-content').hide();
         $('.search-box').append($('.result-content'));
       });
    });
    

    Thanks for the code. Works great!

    Plugin Author Bryan Focht

    (@bfocht)

    Here is some updated CSS and Javascript that work a little better with the

    https://pastebin.com/4MMx55bz
    https://pastebin.com/Z1EzG7j4

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Search results as popup’ is closed to new replies.