Jquery Popup Box

Я новичок в JavaScript и Jquery. Я погуглил всплывающие примеры Jquery онлайн. Я хочу сообщение сказатьНаш веб-сайт еще не завершен, но не стесняйтесь просматривать то, что у нас есть.Я приведу пример кода, который я нашел, но он выглядит очень странно. Я'я не уверен, как называется функция и как ее выполнять с помощью window.onload = function (); код. Я также хочу иметь кнопкублизко' это закрывает текстовое поле. Вот'как это должно выглядеть:http://demo.tutorialzine.com/2010/12/better-confirm-box-jquery-css3/

Вот'Первая часть:

    (function($){

    $.confirm = function(params){

        if($('#confirmOverlay').length){
            // A confirm is already shown on the page:
            return false;
        }

        var buttonHTML = '';
        $.each(params.buttons,function(name,obj){

            // Generating the markup for the buttons:

            buttonHTML += '<a href="#" class="button '+obj['class']+'">'+name+'<span></span></a>';

            if(!obj.action){
                obj.action = function(){};
            }
        });

        var markup = [
            '',
            '',
            '',params.title,'',
            '<p>',params.message,'</p>',
            '',
            buttonHTML,
            ''
        ].join('');

        $(markup).hide().appendTo('body').fadeIn();

        var buttons = $('#confirmBox .button'),
            i = 0;

        $.each(params.buttons,function(name,obj){
            buttons.eq(i++).click(function(){

                // Calling the action attribute when a
                // click occurs, and hiding the confirm.

                obj.action();
                $.confirm.hide();
                return false;
            });
        });
    }

    $.confirm.hide = function(){
        $('#confirmOverlay').fadeOut(function(){
            $(this).remove();
        });
    }

})(jQuery);

Вот'Вторая часть:

$(document).ready(function(){

    $('.item .delete').click(function(){

        var elem = $(this).closest('.item');

        $.confirm({
            'title'     : 'Delete Confirmation',
            'message'   : 'You are about to delete this item. <br>It cannot be restored at a later time! Continue?',
            'buttons'   : {
                'Yes'   : {
                    'class' : 'blue',
                    'action': function(){
                        elem.slideUp();
                    }
                },
                'No'    : {
                    'class' : 'gray',
                    'action': function(){}  // Nothing to do in this case. You can as well omit the action property.
                }
            }
        });

    });

});

            $(markup).hide().appendTo('body').fadeIn();

            var buttons = $('#confirmBox .button'),
                i = 0;

            $.each(params.buttons,function(name,obj){
                buttons.eq(i++).click(function(){

                    // Calling the action attribute when a
                    // click occurs, and hiding the confirm.

                    obj.action();
                    $.confirm.hide();
                    return false;
                });
            });
        }

        $.confirm.hide = function(){
            $('#confirmOverlay').fadeOut(function(){
                $(this).remove();
            });
        }

    })(jQuery);

РЕДАКТИРОВАТЬ: я получил сообщение, чтобы показать при загрузке. Я изменил код во второй части

$ (».item .delete ') .Ready (функция () {

Ответы на вопрос(2)

Ваш ответ на вопрос