﻿(function($){
    $.fn.listDrow = function(pars_) {
        var defaults = $.extend({}, $.fn.listDrow.defaults, pars_);
        var _self = this;
        $.ajax({
			url : defaults.url,
			type : defaults.type,
			cache : false,
			data : defaults.data,
			dataType : defaults.dataType,
			success : function(html_){
               
                if (defaults.onSuccess) {
                    defaults.onSuccess(_self, html_);
                } else {
                   _self.html(html_); 
                }
                if (defaults.afterSuccess) {
                    defaults.afterSuccess(_self);
                }
			}
		});
    }
    $.fn.listDrow.defaults = $.extend({}, {}, {url: null, type:'GET', data: null, dataType: 'html', afterSuccess: function(obj_){}, onSuccess: function(obj_, data_){obj_.html(data_);}});
})(jQuery);
