Floating likebox and problem with IE

Discussion in 'HTML & Website Design' started by doktorrr, Nov 4, 2012.

  1. #1
    I'm create floating likebox facebook on my site. This box is display and disappear on my frontpage after 5 sec only once for user in one day.
    But in IE this likebox is always on my frontpage. Don't disappear at all.
    In all other browsers this work OK.
    Can anybody help me with this?

    In my <head> section I use this:

    <script type="text/javascript" src="https://github.com/carhartl/jquery-cookie/raw/master/jquery.cookie.js"></script>
    <script type="text/javascript">
    $(document).ready(function() {
    if( $.cookie('showOnlyOne') ){
    //it is still within the day
    //hide the div
    $('#lebdeci').hide();
    } else {
    //either cookie already expired, or user never visit the site
    //create the cookie
    $.cookie('showOnlyOne', 'showOnlyOne', { expires: 1 });


    //and display the div
    $('#lebdeci').show();
    }
    });
    </script>



    And in <body> section I use this:

    <?php if ($is_front): ?>
    <div id="lebdeci" style="position:fixed; top:50%; right:75%; background: white; width: 300px; height: 250px;"><iframe


    src="//www.facebook.com/plugins/likebox.php?href=http%3A%2F%2Fwww.facebook.com%2Fpages%2F


    %2F109610108694&amp;width=300&amp;height=250&amp;colorscheme=light&amp;show_faces=true&amp;border_color&amp;stream=false&a


    mp;header=false&amp;appId=172485826110342" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:300px;


    height:250px;" allowTransparency="true"></iframe></div>


    <script type="text/javascript">
    $(document).ready(function(){
    setTimeout(function(){
    $("#lebdeci").fadeOut("slow") //
    }, 7000); //7000 equals 7 seconds
    });
    </script>


    <?php endif; ?>
     
    doktorrr, Nov 4, 2012 IP