// font awesome 4.7 필요함
$.fn.Loading = function (text) {
if (typeof (text) == "undefined" || text == null)
text = "";
return this.each(function () {
var obj = $(this);
obj.width(obj.width());
obj.attr("data-origintext", obj.text());
obj.attr("disabled", true);
obj.html("<i class='fa fa-spinner fa-spin'></i> " + text);
});
};
$.fn.Restore = function () {
return this.each(function () {
var obj = $(this);
obj.attr("disabled", false);
obj.text(obj.attr("data-origintext"));
});
};
'개발 > Jquery' 카테고리의 다른 글
json 으로 DateTime 받는 경우.. (0) | 2018.10.01 |
---|---|
(slimscroll) div overflow시 스크롤 처리 (0) | 2017.03.14 |