Someone can explain me what does this code do?
(function($) {
$.cookie = function(key, value, options) {
// Body of the function here
}
})(jQuery);
Wasn't is simpler just declaring in that way?
function cookie(key, value, options) {
// Body of the function here
}