JQuery code to toggle an edit form I usually find the .js files to be quite messy and the truth is that mine are even worse than the average as, being soft, I'm not the sharpest tool neither at jQuery nor JavaScript.

I would really appreciate if someone could give me a heads up about improving the readability (and point me bad practices) of this code. I would try to have them into account for other .js files.

$(function () {
    $('form').on("click", "div.toggler", function () {
        $(this).next().slideToggle(300);
    });

$('a.edit').click(function (e) {        
    var clickedElement = $(this).parent();
    var url = $('#editForm').data('amp-url');

    $.get(url, { id: parseInt($(this).attr('id')) }, function (result) {
        $("#editForm").html(result);

        // Display edit form just below the "item" clicked
        if ($("#editForm").is(":visible")) {
            $('#editForm').slideToggle(300, function() {
                $("#editForm").appendTo(clickedElement);
                $('#editForm').slideToggle(300);
            });
        } else {
            $("#editForm").appendTo(clickedElement);
            $('#editForm').slideToggle(300);
        }
    }, "html");
    e.preventDefault();
});

// Hide edit form when click outside it 
$(document).mouseup(function (e) {
    if ($('#editForm').is(":visible")) {
        var container = $("#editForm");

        if (container.has(e.target).length === 0) {
            container.slideUp(300);
        }
    }
});

(function (a) {

    jQuery.fn.screencenter = function () {
        this.css("position", "absolute");
        this.css("top", (($(window).height() - this.outerHeight()) / 2) + $(window).scrollTop() + "px");
        this.css("left", (($(window).width() - this.outerWidth()) / 2) + $(window).scrollLeft() + "px");
        return this;
    };
})(jQuery);
});


By the way, I have seen here that deferred objects seems cleaner (apart of other considerations). I couldn't make it work, though.
As Dagg said in his comment, try to cache things as much as possible - I haven't tested this code but you could do something like this:

(function ($, window) {
    // Do stuff when the DOM is ready.
    $(function () {

        $('form').on("click", "div.toggler", function () {
            $(this).next().slideToggle(300);
        });

        $('a.edit').click(function (e) {
            var clickedElement = $(this).parent(),
                editForm = $('#editForm'), // cache the edit form element.
                url = editForm.data('amp-url');

            $.get(url, {
                id: parseInt(this.id, 10) // Always specify the radix parameter
            }, function (result) {
                editForm.html(result);

                // Display edit form just below the "item" clicked
                if (editForm.is(":visible")) {
                    editForm.slideToggle(300, function () {
                        editForm.appendTo(clickedElement);
                        editForm.slideToggle(300);
                    });
                } else {
                    editForm.appendTo(clickedElement);
                    editForm.slideToggle(300);
                }
            },
                "html");
            e.preventDefault();
        });

        // Hide edit form when click outside it 
        $(document).mouseup(function (e) {
            var container = $("#editForm");
            if (container.is(":visible")) {
                if (container.has(e.target).length === 0) {
                    container.slideUp(300);
                }
            }
        });
    });

    // Add the screen center function to jQuery.
    $.fn.screencenter = function () {
        var w = $(window);
        this.css("position", "absolute");
        this.css("top", ((w.height() - this.outerHeight()) / 2) + w.scrollTop() + "px");
        this.css("left", ((w.width() - this.outerWidth()) / 2) + w.scrollLeft() + "px");
        return this;
    };
}(jQuery, window));


This avoids having to hit the DOM each time, for example, you had $('window') four times... It's much better to get it once and store it in a variable.

I've also wrapped everything in an IIFE (Immediately Invoked Function Expression).

I'm not sure what you were trying to do here: 

(function (a) {
    // code omitted.
})(jQuery);


But effectively you are passing the jQuery object into a function aliased as a. Then you are not using a but the jQuery object anyway - a bit pointless.

Edit:
Regarding the deferred object question:

var idToSend = 10;
var request = $.get(url, {
    id:  idToSend
});

// Assign handlers for events (can also chain):
request.done(function (result) {
    // Code for success.  
}).fail(function (result) {
    // Code for fail
});