Show facebook like box when open the page using Bootstrap Modals


Do you wish to show Advertisement or Facebook like box when your website open ?
If yes, bootstrap Modals is the best choice for creating modal windows & prompts boxes

The Bootstrap Modal is a lightweight multi-purpose JavaScript popup that is customizable and responsive. It can be used to display alert popups, videos, and images in a website.

The following example will create facebook like box as popup with a header, message body and the footer containing close button for the user.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Show advertisement when I open the page</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript">
    $(document).ready(function(){
        $("#myModal").modal('show');
    });
</script>
</head>
<body>
<div id="myModal" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title">Advertisement</h4>
            </div>
            <div class="modal-body">
            <!--  Place your Advertisement code here -->
               <iframe src="https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2FEasytousecode-148717235543436%2F&tabs=timeline&width=500&height=70&small_header=false&adapt_container_width=true&hide_cover=false&show_facepile=true&appId" width="500" height="70" style="border:none;overflow:hidden" scrolling="no" frameborder="0" allowTransparency="true"></iframe>
            </div>
             <div class="modal-footer"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">[X] CLOSE</button></div>
        </div>
    </div>
</div>
</body>
</html>
Related Posts Plugin for WordPress, Blogger...